diff options
author | Antonio Quartulli <ordex@autistici.org> | 2011-04-20 03:52:56 -0400 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-05-01 16:49:03 -0400 |
commit | 5f657ec0d2103571a31707711926b443a27b0c66 (patch) | |
tree | 573b6740dffb1ad7891d6e04027e12c038e6bd28 /net | |
parent | b5a6f69c5ca024bea43496d517c3b7ccfdb084a6 (diff) |
batman-adv: Move definition of atomic_dec_not_zero() into main.h
atomic_dec_not_zero() is very useful and it is currently defined
multiple times. So it is possible to move it in main.h
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/aggregation.c | 1 | ||||
-rw-r--r-- | net/batman-adv/main.h | 2 | ||||
-rw-r--r-- | net/batman-adv/send.c | 1 |
3 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/aggregation.c b/net/batman-adv/aggregation.c index af45d6b2031f..c11788c4c1a1 100644 --- a/net/batman-adv/aggregation.c +++ b/net/batman-adv/aggregation.c | |||
@@ -95,7 +95,6 @@ static bool can_aggregate_with(struct batman_packet *new_batman_packet, | |||
95 | return false; | 95 | return false; |
96 | } | 96 | } |
97 | 97 | ||
98 | #define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0) | ||
99 | /* create a new aggregated packet and add this packet to it */ | 98 | /* create a new aggregated packet and add this packet to it */ |
100 | static void new_aggregated_packet(unsigned char *packet_buff, int packet_len, | 99 | static void new_aggregated_packet(unsigned char *packet_buff, int packet_len, |
101 | unsigned long send_time, bool direct_link, | 100 | unsigned long send_time, bool direct_link, |
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index dc248697de71..ace72852ed7b 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h | |||
@@ -175,4 +175,6 @@ static inline int compare_eth(void *data1, void *data2) | |||
175 | return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0); | 175 | return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0); |
176 | } | 176 | } |
177 | 177 | ||
178 | #define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0) | ||
179 | |||
178 | #endif /* _NET_BATMAN_ADV_MAIN_H_ */ | 180 | #endif /* _NET_BATMAN_ADV_MAIN_H_ */ |
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c index e78670c3c4b7..7650e2bf187d 100644 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c | |||
@@ -393,7 +393,6 @@ static void _add_bcast_packet_to_list(struct bat_priv *bat_priv, | |||
393 | send_time); | 393 | send_time); |
394 | } | 394 | } |
395 | 395 | ||
396 | #define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0) | ||
397 | /* add a broadcast packet to the queue and setup timers. broadcast packets | 396 | /* add a broadcast packet to the queue and setup timers. broadcast packets |
398 | * are sent multiple times to increase probability for beeing received. | 397 | * are sent multiple times to increase probability for beeing received. |
399 | * | 398 | * |