Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix boolreturn.cocci warnings

2016-07-06 Thread Marek Lindner
On Wednesday, July 06, 2016 10:49:29 kbuild test robot wrote: > net/batman-adv/bridge_loop_avoidance.c:1105:9-10: WARNING: return of 0/1 in > function 'batadv_bla_process_claim' with return type bool > > Return statements in functions returning bool should use > true/false instead of 1/0. > Gene

Re: [B.A.T.M.A.N.] [PATCH 07/14] batman-adv: use list_for_each_entry_safe

2016-03-28 Thread Marek Lindner
On Friday, December 18, 2015 23:33:31 Geliang Tang wrote: > Use list_for_each_entry_safe() instead of list_for_each_safe() to > simplify the code. > > Signed-off-by: Geliang Tang > --- > net/batman-adv/icmp_socket.c | 22 +- > 1 file changed, 9 insertions(+), 13 deletions(-)

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: use to_delayed_work

2016-03-28 Thread Marek Lindner
On Monday, December 28, 2015 23:43:37 Geliang Tang wrote: > Use to_delayed_work() instead of open-coding it. > > Signed-off-by: Geliang Tang > --- > net/batman-adv/bridge_loop_avoidance.c | 2 +- > net/batman-adv/distributed-arp-table.c | 2 +- > net/batman-adv/network-coding.c| 2 +- >

Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Delete unnecessary checks before the function call "kfree_skb"

2015-11-21 Thread Marek Lindner
On Sunday, November 15, 2015 09:43:26 SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 15 Nov 2015 08:04:43 +0100 > > The kfree_skb() function tests whether its argument is NULL and then > returns immediately. Thus the test around the calls is not needed. > > This issue was detected

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Delete an unnecessary check before the function call "batadv_softif_vlan_free_ref"

2015-11-21 Thread Marek Lindner
On Tuesday, November 03, 2015 21:52:58 SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 3 Nov 2015 19:20:34 +0100 > > The batadv_softif_vlan_free_ref() function tests whether its argument is > NULL and then returns immediately. Thus the test around the call is not > needed. > > This

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Less checks in batadv_tvlv_unicast_send()

2015-11-21 Thread Marek Lindner
On Sunday, November 15, 2015 09:45:51 SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 15 Nov 2015 09:00:42 +0100 > > * Let us return directly if a call of the batadv_orig_hash_find() function > returned a null pointer. > > * Omit the initialisation for the variable "skb" at the be

Re: [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: Split a condition check

2015-11-21 Thread Marek Lindner
On Tuesday, November 03, 2015 21:54:35 SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 3 Nov 2015 20:41:02 +0100 > > Let us split a check for a condition at the beginning of the > batadv_is_ap_isolated() function so that a direct return can be performed > in this function if the vari

Re: [B.A.T.M.A.N.] checkpatch: CHECK: No space is necessary after a cast

2015-02-20 Thread Marek Lindner
On Thursday, February 19, 2015 11:55:41 Joe Perches wrote: > > Can you make a suggestion / patch for checkpatch to better handle this > > case ? > The "sizeof" test in the current script doesn't work. > > I believe the patch below works with no false positives > but it's perl regexes against odd

checkpatch: CHECK: No space is necessary after a cast

2015-02-18 Thread Marek Lindner
Hi Joe, we have come across a checkpatch false-positive: static void batadv_recv_handler_init(void) { int i; for (i = 0; i < ARRAY_SIZE(batadv_rx_handler); i++) batadv_rx_handler[i] = batadv_recv_unhandled_packet; for (i = BATADV_UNICAST_MIN; i <= B

Re: [B.A.T.M.A.N.] batman-adv: gpf in batadv_slide_own_bcast_window

2013-02-25 Thread Marek Lindner
On Saturday, February 23, 2013 02:37:06 Sasha Levin wrote: > I'm confused about how batadv_orig_hash_del_if removes an interface from > the hashtable. I see the hashtable is using rcu to protect it, but when we > delete an entry we free it straight away by calling > batadv_orig_node_del_if() and no

Re: [B.A.T.M.A.N.] [PATCH 20/29] batman-adv: rename random32() to prandom_u32()

2013-01-02 Thread Marek Lindner
On Tuesday, December 25, 2012 19:30:36 Antonio Quartulli wrote: > On Mon, Dec 24, 2012 at 11:14:07AM +0900, Akinobu Mita wrote: > > Use more preferable function name which implies using a pseudo-random > > number generator. > > > > Signed-off-by: Akinobu Mita > >

Re: [B.A.T.M.A.N.] [PATCH] net, batman: don't crash on zero length strings in routing_algo

2012-12-25 Thread Marek Lindner
On Tuesday, December 25, 2012 03:36:36 Marek Lindner wrote: > > >> > empty, this assumption is wrong: > > >> Why isn't this patch part of Linux 3.7? It seems to be a bugfix and it > > >> was sent early enough? > > > > > > Th

Re: [B.A.T.M.A.N.] [PATCH] net, batman: don't crash on zero length strings in routing_algo

2012-12-24 Thread Marek Lindner
On Monday, December 24, 2012 23:42:15 Pau Koning wrote: > On Mon, Dec 24, 2012 at 3:38 PM, Marek Lindner wrote: > > On Monday, December 24, 2012 22:18:52 Pau Koning wrote: > >> On Mon, Nov 19, 2012 at 9:08 PM, Sasha Levin wrote: > >> > The code that works with

Re: [B.A.T.M.A.N.] [PATCH] net, batman: don't crash on zero length strings in routing_algo

2012-12-24 Thread Marek Lindner
On Monday, December 24, 2012 22:18:52 Pau Koning wrote: > On Mon, Nov 19, 2012 at 9:08 PM, Sasha Levin wrote: > > The code that works with routing_algo assumes that the string passed is > > non > > > empty, this assumption is wrong: > Why isn't this patch part of Linux 3.7? It seems to be a bugfi

Re: [B.A.T.M.A.N.] [PATCH v4 9/9] net: batman-adv: use per_cpu_add helper

2012-11-13 Thread Marek Lindner
On Tuesday, November 13, 2012 09:53:26 Shan Wei wrote: > From: Shan Wei > > this_cpu_add is an atomic operation. > and be more faster than per_cpu_ptr operation. > > Signed-off-by: Shan Wei > Reviewed-by: Christoph Lameter > --- > v4: no changes vs v3. > --- > net/batman-adv/main.h |4 +--