summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bitarray.c
diff options
context:
space:
mode:
authorSven Eckelmann2012-05-12 02:09:25 +0200
committerAntonio Quartulli2012-06-20 22:15:16 +0200
commit0f5f9322681887ca221707afafe4216b6db5d22f (patch)
tree93a654d6a5433adedeaee26cd204ad4b338304b1 /net/batman-adv/bitarray.c
parentbatman-adv: Prefix bat_sysfs non-static functions with batadv_ (diff)
downloadkernel-qcow2-linux-0f5f9322681887ca221707afafe4216b6db5d22f.tar.gz
kernel-qcow2-linux-0f5f9322681887ca221707afafe4216b6db5d22f.tar.xz
kernel-qcow2-linux-0f5f9322681887ca221707afafe4216b6db5d22f.zip
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 @@
#include <linux/bitops.h>
/* shift the packet array by n places. */
-static void bat_bitmap_shift_left(unsigned long *seq_bits, int32_t n)
+static void batadv_bitmap_shift_left(unsigned long *seq_bits, int32_t n)
{
if (n <= 0 || n >= TQ_LOCAL_WINDOW_SIZE)
return;
@@ -40,8 +40,8 @@ static void bat_bitmap_shift_left(unsigned long *seq_bits, int32_t n)
* 1 if the window was moved (either new or very old)
* 0 if the window was not moved/shifted.
*/
-int bit_get_packet(void *priv, unsigned long *seq_bits,
- int32_t seq_num_diff, int set_mark)
+int batadv_bit_get_packet(void *priv, unsigned long *seq_bits,
+ int32_t seq_num_diff, int set_mark)
{
struct bat_priv *bat_priv = priv;
@@ -58,7 +58,7 @@ int bit_get_packet(void *priv, unsigned long *seq_bits,
* set the mark if required */
if ((seq_num_diff > 0) && (seq_num_diff < TQ_LOCAL_WINDOW_SIZE)) {
- bat_bitmap_shift_left(seq_bits, seq_num_diff);
+ batadv_bitmap_shift_left(seq_bits, seq_num_diff);
if (set_mark)
bat_set_bit(seq_bits, 0);