Re: [B.A.T.M.A.N.] [RFC PATCHv2] batman-adv: Add missing hardif_free_ref in forw_packet_free

2011-05-14 Thread Marek Lindner
On Wednesday 11 May 2011 20:59:06 Sven Eckelmann wrote: add_bcast_packet_to_list increases the refcount for if_incoming but the reference count is never decreased. The reference count must be increased for all kinds of forwarded packets which have the primary interface stored and

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: reset broadcast flood protection on error

2011-05-14 Thread Sven Eckelmann
Marek Lindner wrote: The broadcast flood protection should be reset to its original value if the primary interface could not be retrieved. Signed-off-by: Marek Lindner lindner_ma...@yahoo.de --- send.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/send.c

[B.A.T.M.A.N.] [PATCH 1/9] batman-adv: Annotate functions with format strings

2011-05-14 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- bat_debugfs.c |1 + main.h|3 ++- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/bat_debugfs.c b/bat_debugfs.c index abaeec5..4577d3f 100644 --- a/bat_debugfs.c +++ b/bat_debugfs.c @@ -50,6 +50,7 @@ static void

[B.A.T.M.A.N.] [PATCH 2/9] batman-adv: Print jiffies as unsigned long

2011-05-14 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- bat_debugfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bat_debugfs.c b/bat_debugfs.c index 4577d3f..e8491ee 100644 --- a/bat_debugfs.c +++ b/bat_debugfs.c @@ -82,7 +82,7 @@ int debug_log(struct bat_priv

[B.A.T.M.A.N.] [PATCH 3/9] batman-adv: Remove comparising 0 for unsigned type

2011-05-14 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- bat_debugfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bat_debugfs.c b/bat_debugfs.c index e8491ee..628ab18 100644 --- a/bat_debugfs.c +++ b/bat_debugfs.c @@ -115,7 +115,7 @@ static ssize_t log_read(struct file

[B.A.T.M.A.N.] [PATCH 4/9] batman-adv: Don't do pointer arithmetic with void*

2011-05-14 Thread Sven Eckelmann
The size of void is currently set by gcc to 1, but is not well defined in general. Therefore it is more advisable to cast it to char* before doing pointer arithmetic. Signed-off-by: Sven Eckelmann s...@narfation.org --- originator.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

[B.A.T.M.A.N.] [PATCH 5/9] batman-adv: Add const type qualifier for pointers

2011-05-14 Thread Sven Eckelmann
batman-adv uses pointers which are marked as const and should not violate that type qualifier by passing it to functions which force a cast to the non-const version. Signed-off-by: Sven Eckelmann s...@narfation.org --- aggregation.c | 21 +++-- aggregation.h |5

[B.A.T.M.A.N.] [PATCH 6/9] batman-adv: Only use in up and down gw representation

2011-05-14 Thread Sven Eckelmann
It is not save to provide memory for an int and then cast the pointer to it to long*. It is better to standardize the up and down gateway bandwith representation to simple ints and only use long inside conversation routines. Signed-off-by: Sven Eckelmann s...@narfation.org --- gateway_common.c |

[B.A.T.M.A.N.] [PATCH 7/9] batman-adv: Remove explicit casts cast from void* for store

2011-05-14 Thread Sven Eckelmann
It is not necessary to cast a void* to the pointer type when we just store it and don't want to do pointer arithmetic before the actual assignment. Signed-off-by: Sven Eckelmann s...@narfation.org --- bitarray.c |2 +- hard-interface.c|2 +- translation-table.c |2 +- 3

[B.A.T.M.A.N.] [PATCH 8/9] batman-adv: Remove casts from type x to type x

2011-05-14 Thread Sven Eckelmann
Casting from pointer like 'struct orig_node*' to 'struct orig_node *' doesn't provide any additional functionality and can be savely removed. Signed-off-by: Sven Eckelmann s...@narfation.org --- unicast.c |2 +- vis.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[B.A.T.M.A.N.] [PATCH 9/9] batman-adv: Calculate sizeof using variable insead of types

2011-05-14 Thread Sven Eckelmann
Documentation/CodingStyle recommends to use the form p = kmalloc(sizeof(*p), ...); to calculate the size of a struct and not the version where the struct name is spelled out to prevent bugs when the type of p changes. This also seems appropriate for manipulation of buffers when they are

[B.A.T.M.A.N.] pull request: batman-adv 2011-05-14

2011-05-14 Thread Sven Eckelmann
Hi, I would like tp propose following corrections for net-next-2.6/2.6.40. Both are bug fixes. The first one fixes the regression introduced by batman-adv: Make bat_priv-primary_if an rcu protected pointer which prevented that the attached net_devices could be destroyed because the references to

[B.A.T.M.A.N.] [PATCH 10/09] batman-adv: Use rcu_dereference_protected by update-side

2011-05-14 Thread Sven Eckelmann
Usually rcu_dereference isn't necessary in situations were the RCU-protected data structure cannot change, but sparse and lockdep still need a similar functionality for analysis. rcu_dereference_protected implements the reduced version which should be used to support the dynamic and static