From patchwork Sun Oct 19 17:59:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 4207 Return-Path: Received: from s3.neomailbox.net (s3.neomailbox.net [178.209.62.157]) by open-mesh.org (Postfix) with ESMTPS id 822096007D1 for ; Sun, 19 Oct 2014 20:02:12 +0200 (CEST) From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 19 Oct 2014 19:59:41 +0200 Message-Id: <1413741581-20407-1-git-send-email-antonio@meshcoding.com> Cc: Antonio Quartulli Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: move misplaced compat code X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2014 18:02:12 -0000 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 Signed-off-by: Antonio Quartulli --- 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_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)