From patchwork Thu Jun 21 16:57:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 2010 Return-Path: Received: from contumacia.investici.org (contumacia.investici.org [178.255.144.35]) by open-mesh.org (Postfix) with ESMTPS id 72DE260074E for ; Thu, 21 Jun 2012 18:57:48 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key; insecure key) header.i=@autistici.org; dkim-adsp=pass Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id E8555E88B7; Thu, 21 Jun 2012 16:57:46 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org E8555E88B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1340297867; bh=OmbaAoBg09gJ9DlIk5O+cCGWFCVsny520TXbe3/E08c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=kwxsXQvsoqOpPl39pcqlmqksZxWNGszC4Akdz8pIM49LNUMFATliABhw/9mGZE0jG HzZBqVBPlbluJxyAJO22sQys/hjTMLIh5BU7ChK3mR2efi164Ltrt2PNQjt+q4c3/+ 0F4tV7SjQTWiCnxjPBhT/Oef1ZogdUO8ScbYLhAo= From: Antonio Quartulli To: davem@davemloft.net Date: Thu, 21 Jun 2012 18:57:37 +0200 Message-Id: <1340297876-29923-2-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.9.4 In-Reply-To: <1340297876-29923-1-git-send-email-ordex@autistici.org> References: <1340297876-29923-1-git-send-email-ordex@autistici.org> Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org Subject: [B.A.T.M.A.N.] [PATCH 01/20] batman-adv: Prefix bat_algo non-static functions with batadv_ X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 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: Thu, 21 Jun 2012 16:57:48 -0000 From: Sven Eckelmann batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller Signed-off-by: Sven Eckelmann Signed-off-by: Antonio Quartulli --- net/batman-adv/bat_algo.h | 2 +- net/batman-adv/bat_iv_ogm.c | 2 +- net/batman-adv/main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/batman-adv/bat_algo.h b/net/batman-adv/bat_algo.h index 9852a68..a14336a 100644 --- a/net/batman-adv/bat_algo.h +++ b/net/batman-adv/bat_algo.h @@ -22,6 +22,6 @@ #ifndef _NET_BATMAN_ADV_BAT_ALGO_H_ #define _NET_BATMAN_ADV_BAT_ALGO_H_ -int bat_iv_init(void); +int batadv_iv_init(void); #endif /* _NET_BATMAN_ADV_BAT_ALGO_H_ */ diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 6e0859f..b445739 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -1248,7 +1248,7 @@ static struct bat_algo_ops batman_iv __read_mostly = { .bat_ogm_emit = bat_iv_ogm_emit, }; -int __init bat_iv_init(void) +int __init batadv_iv_init(void) { int ret; diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 46ba302..1f064d4 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c @@ -56,7 +56,7 @@ static int __init batman_init(void) recv_handler_init(); - bat_iv_init(); + batadv_iv_init(); /* the name should not be longer than 10 chars - see * http://lwn.net/Articles/23634/ */