From: Antonio Quartulli <antonio@meshcoding.com>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Antonio Quartulli <antonio@meshcoding.com>
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: move misplaced compat code
Date: Sun, 19 Oct 2014 19:59:41 +0200 [thread overview]
Message-ID: <1413741581-20407-1-git-send-email-antonio@meshcoding.com> (raw)
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
next reply other threads:[~2014-10-19 17:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-19 17:59 Antonio Quartulli [this message]
2014-12-29 3:55 ` [B.A.T.M.A.N.] [PATCH] batman-adv: move misplaced compat code Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413741581-20407-1-git-send-email-antonio@meshcoding.com \
--to=antonio@meshcoding.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox