public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCHv3 02/23] batman-adv: Prefix bat_algo non-static functions with batadv_
Date: Sat, 12 May 2012 02:09:22 +0200	[thread overview]
Message-ID: <1336781383-15649-2-git-send-email-sven@narfation.org> (raw)
In-Reply-To: <1336781383-15649-1-git-send-email-sven@narfation.org>

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 <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 bat_algo.h   |    2 +-
 bat_iv_ogm.c |    2 +-
 main.c       |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bat_algo.h b/bat_algo.h
index 9852a68..a14336a 100644
--- a/bat_algo.h
+++ b/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/bat_iv_ogm.c b/bat_iv_ogm.c
index f724d44..470fe01 100644
--- a/bat_iv_ogm.c
+++ b/bat_iv_ogm.c
@@ -1247,7 +1247,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/main.c b/main.c
index 805373f..f272ed4 100644
--- a/main.c
+++ b/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/ */
-- 
1.7.10


  reply	other threads:[~2012-05-12  0:09 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-12  0:09 [B.A.T.M.A.N.] [PATCHv3 01/23] batman-adv: Fix namespace for hash_set_lock_class Sven Eckelmann
2012-05-12  0:09 ` Sven Eckelmann [this message]
2012-05-13 16:11   ` [B.A.T.M.A.N.] [PATCHv3 02/23] batman-adv: Prefix bat_algo non-static functions with batadv_ Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 03/23] batman-adv: Prefix bat_debugfs " Sven Eckelmann
2012-05-13 16:13   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 04/23] batman-adv: Prefix bat_sysfs " Sven Eckelmann
2012-05-13 16:15   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 05/23] batman-adv: Prefix bitarray " Sven Eckelmann
2012-05-13 16:19   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 06/23] batman-adv: Prefix bridge_loop_avoidance " Sven Eckelmann
2012-05-12 11:38   ` [B.A.T.M.A.N.] [PATCHv4 " Sven Eckelmann
2012-05-13 16:24     ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 07/23] batman-adv: Prefix compat " Sven Eckelmann
2012-05-12  8:45   ` [B.A.T.M.A.N.] [PATCHv4 " Sven Eckelmann
2012-05-13 16:28     ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 08/23] batman-adv: Prefix distributed-arp-table " Sven Eckelmann
2012-05-13 16:33   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 09/23] batman-adv: Prefix gateway-client " Sven Eckelmann
2012-05-13 16:40   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 10/23] batman-adv: Prefix gateway-common " Sven Eckelmann
2012-05-13 16:44   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 11/23] batman-adv: Prefix hard-interface " Sven Eckelmann
2012-05-14  8:05   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 12/23] batman-adv: Prefix hash " Sven Eckelmann
2012-05-14  8:06   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 13/23] batman-adv: Prefix icmp-socket " Sven Eckelmann
2012-05-14  8:07   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 14/23] batman-adv: Prefix originator " Sven Eckelmann
2012-05-14  8:12   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 15/23] batman-adv: Prefix ring_buffer " Sven Eckelmann
2012-05-14  8:13   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 16/23] batman-adv: Prefix routing " Sven Eckelmann
2012-05-14  8:19   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 17/23] batman-adv: Prefix send " Sven Eckelmann
2012-05-14  8:21   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 18/23] batman-adv: Prefix soft-interface " Sven Eckelmann
2012-05-14  8:23   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 19/23] batman-adv: Prefix translation-table " Sven Eckelmann
2012-05-14  8:34   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 20/23] batman-adv: Prefix unicast " Sven Eckelmann
2012-05-14  8:38   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 21/23] batman-adv: Prefix vis " Sven Eckelmann
2012-05-14  8:44   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 22/23] batman-adv: Prefix main " Sven Eckelmann
2012-05-14  8:53   ` Marek Lindner
2012-05-12  0:09 ` [B.A.T.M.A.N.] [PATCHv3 23/23] batman-adv: Reformat multiline to consistent style Sven Eckelmann
2012-05-14  9:05   ` Marek Lindner
2012-05-13 16:09 ` [B.A.T.M.A.N.] [PATCHv3 01/23] batman-adv: Fix namespace for hash_set_lock_class 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=1336781383-15649-2-git-send-email-sven@narfation.org \
    --to=sven@narfation.org \
    --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