diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-12 02:09:35 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 22:15:24 +0200 |
commit | 925a6672fae532ba178b8d35686705b417aada3d (patch) | |
tree | 25e1d6b83170dd63c384290c11bc47b1d38d8557 /net/batman-adv/ring_buffer.c | |
parent | 7d211efc5087bc8870fa3374da88b4bf8159e79b (diff) | |
download | op-kernel-dev-925a6672fae532ba178b8d35686705b417aada3d.zip op-kernel-dev-925a6672fae532ba178b8d35686705b417aada3d.tar.gz |
batman-adv: Prefix ring_buffer 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/ring_buffer.c')
-rw-r--r-- | net/batman-adv/ring_buffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/batman-adv/ring_buffer.c b/net/batman-adv/ring_buffer.c index fd63951..db8f5ef 100644 --- a/net/batman-adv/ring_buffer.c +++ b/net/batman-adv/ring_buffer.c @@ -22,13 +22,14 @@ #include "main.h" #include "ring_buffer.h" -void ring_buffer_set(uint8_t lq_recv[], uint8_t *lq_index, uint8_t value) +void batadv_ring_buffer_set(uint8_t lq_recv[], uint8_t *lq_index, + uint8_t value) { lq_recv[*lq_index] = value; *lq_index = (*lq_index + 1) % TQ_GLOBAL_WINDOW_SIZE; } -uint8_t ring_buffer_avg(const uint8_t lq_recv[]) +uint8_t batadv_ring_buffer_avg(const uint8_t lq_recv[]) { const uint8_t *ptr; uint16_t count = 0, i = 0, sum = 0; |