aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bitarray.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-11 20:09:25 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-20 16:15:16 -0400
commit0f5f9322681887ca221707afafe4216b6db5d22f (patch)
tree93a654d6a5433adedeaee26cd204ad4b338304b1 /net/batman-adv/bitarray.c
parent5853e22c58b318232fd6e15033ccb0852f865c0b (diff)
batman-adv: Prefix bitarray non-static functions with batadv_
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>
Diffstat (limited to 'net/batman-adv/bitarray.c')
-rw-r--r--net/batman-adv/bitarray.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/bitarray.c b/net/batman-adv/bitarray.c
index 07ae6e1b8aca..99ed9917ff0d 100644
--- a/net/batman-adv/bitarray.c
+++ b/net/batman-adv/bitarray.c
@@ -25,7 +25,7 @@
25#include <linux/bitops.h> 25#include <linux/bitops.h>
26 26
27/* shift the packet array by n places. */ 27/* shift the packet array by n places. */
28static void bat_bitmap_shift_left(unsigned long *seq_bits, int32_t n) 28static void batadv_bitmap_shift_left(unsigned long *seq_bits, int32_t n)
29{ 29{
30 if (n <= 0 || n >= TQ_LOCAL_WINDOW_SIZE) 30 if (n <= 0 || n >= TQ_LOCAL_WINDOW_SIZE)
31 return; 31 return;
@@ -40,8 +40,8 @@ static void bat_bitmap_shift_left(unsigned long *seq_bits, int32_t n)
40 * 1 if the window was moved (either new or very old) 40 * 1 if the window was moved (either new or very old)
41 * 0 if the window was not moved/shifted. 41 * 0 if the window was not moved/shifted.
42 */ 42 */
43int bit_get_packet(void *priv, unsigned long *seq_bits, 43int batadv_bit_get_packet(void *priv, unsigned long *seq_bits,
44 int32_t seq_num_diff, int set_mark) 44 int32_t seq_num_diff, int set_mark)
45{ 45{
46 struct bat_priv *bat_priv = priv; 46 struct bat_priv *bat_priv = priv;
47 47
@@ -58,7 +58,7 @@ int bit_get_packet(void *priv, unsigned long *seq_bits,
58 * set the mark if required */ 58 * set the mark if required */
59 59
60 if ((seq_num_diff > 0) && (seq_num_diff < TQ_LOCAL_WINDOW_SIZE)) { 60 if ((seq_num_diff > 0) && (seq_num_diff < TQ_LOCAL_WINDOW_SIZE)) {
61 bat_bitmap_shift_left(seq_bits, seq_num_diff); 61 batadv_bitmap_shift_left(seq_bits, seq_num_diff);
62 62
63 if (set_mark) 63 if (set_mark)
64 bat_set_bit(seq_bits, 0); 64 bat_set_bit(seq_bits, 0);