Skip to content

Commit

Permalink
batman-adv: Prefix bat_algo non-static functions with batadv_
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sven Eckelmann authored and Antonio Quartulli committed Jun 20, 2012
1 parent 41063e9 commit 81c524f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/batman-adv/bat_algo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ */
2 changes: 1 addition & 1 deletion net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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/ */
Expand Down

0 comments on commit 81c524f

Please sign in to comment.