From 3e34819e0eafaa6c873e9704bb478c0cdd6bb481 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Wed, 16 May 2012 20:23:22 +0200 Subject: batman-adv: Prefix remaining function like macros with batadv_ Signed-off-by: Sven Eckelmann --- net/batman-adv/main.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'net/batman-adv/main.h') diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 28242642c3f1..b7b98177dadc 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -190,14 +190,14 @@ static inline void batadv_dbg(int type __always_unused, } #endif -#define bat_info(net_dev, fmt, arg...) \ +#define batadv_info(net_dev, fmt, arg...) \ do { \ struct net_device *_netdev = (net_dev); \ struct bat_priv *_batpriv = netdev_priv(_netdev); \ batadv_dbg(DBG_ALL, _batpriv, fmt, ## arg); \ pr_info("%s: " fmt, _netdev->name, ## arg); \ } while (0) -#define bat_err(net_dev, fmt, arg...) \ +#define batadv_err(net_dev, fmt, arg...) \ do { \ struct net_device *_netdev = (net_dev); \ struct bat_priv *_batpriv = netdev_priv(_netdev); \ @@ -226,10 +226,10 @@ static inline bool batadv_has_timed_out(unsigned long timestamp, return time_is_before_jiffies(timestamp + msecs_to_jiffies(timeout)); } -#define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0) +#define batadv_atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0) /* Returns the smallest signed integer in two's complement with the sizeof x */ -#define smallest_signed_int(x) (1u << (7u + 8u * (sizeof(x) - 1u))) +#define batadv_smallest_signed_int(x) (1u << (7u + 8u * (sizeof(x) - 1u))) /* Checks if a sequence number x is a predecessor/successor of y. * they handle overflows/underflows and can correctly check for a @@ -241,12 +241,12 @@ static inline bool batadv_has_timed_out(unsigned long timestamp, * - when adding 128 - it is neither a predecessor nor a successor, * - after adding more than 127 to the starting value - it is a successor */ -#define seq_before(x, y) ({typeof(x) _d1 = (x); \ - typeof(y) _d2 = (y); \ - typeof(x) _dummy = (_d1 - _d2); \ - (void) (&_d1 == &_d2); \ - _dummy > smallest_signed_int(_dummy); }) -#define seq_after(x, y) seq_before(y, x) +#define batadv_seq_before(x, y) ({typeof(x) _d1 = (x); \ + typeof(y) _d2 = (y); \ + typeof(x) _dummy = (_d1 - _d2); \ + (void) (&_d1 == &_d2); \ + _dummy > batadv_smallest_signed_int(_dummy); }) +#define batadv_seq_after(x, y) batadv_seq_before(y, x) /* Stop preemption on local cpu while incrementing the counter */ static inline void batadv_add_counter(struct bat_priv *bat_priv, size_t idx, -- cgit v1.2.3-55-g7522