* [B.A.T.M.A.N.] [PATCH] batman-adv: move misplaced compat code
@ 2014-10-19 17:59 Antonio Quartulli
2014-12-29 3:55 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2014-10-19 17:59 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
consume_skb() has to be re-defined only for kernels <2.6.30
but the macro was accidentally placed right above any #ifdef
block causing the function to be always redefined.
Fix this by moving the macro to the proper #ifdef block.
Introduced by: 15fb0fab51a3695738f65dfaab045e979fc89dce
("batman-adv add compat code for consume_skb")
Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
---
compat.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compat.h b/compat.h
index ed5b815..8de2010 100644
--- a/compat.h
+++ b/compat.h
@@ -23,10 +23,10 @@
#include <linux/version.h> /* LINUX_VERSION_CODE */
-#define consume_skb(_skb) kfree_skb(_skb)
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
+#define consume_skb(_skb) kfree_skb(_skb)
+
#undef __alloc_percpu
#define __alloc_percpu(size, align) \
percpu_alloc_mask((size), GFP_KERNEL, cpu_possible_map)
--
2.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: move misplaced compat code
2014-10-19 17:59 [B.A.T.M.A.N.] [PATCH] batman-adv: move misplaced compat code Antonio Quartulli
@ 2014-12-29 3:55 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2014-12-29 3:55 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
On Sunday 19 October 2014 19:59:41 Antonio Quartulli wrote:
> consume_skb() has to be re-defined only for kernels <2.6.30
> but the macro was accidentally placed right above any #ifdef
> block causing the function to be always redefined.
>
> Fix this by moving the macro to the proper #ifdef block.
>
> Introduced by: 15fb0fab51a3695738f65dfaab045e979fc89dce
> ("batman-adv add compat code for consume_skb")
>
> Reported-by: Sven Eckelmann <sven@narfation.org>
> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
> ---
> compat.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied in revision b609f26.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-29 3:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-19 17:59 [B.A.T.M.A.N.] [PATCH] batman-adv: move misplaced compat code Antonio Quartulli
2014-12-29 3:55 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).