aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/main.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-16 14:23:22 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-28 02:44:48 -0400
commit3e34819e0eafaa6c873e9704bb478c0cdd6bb481 (patch)
treeb8f8d24ca23a92bd235ae06342e33ddab7811508 /net/batman-adv/main.h
parentee11ad61f232c201ba62990aa490264220f834cd (diff)
batman-adv: Prefix remaining function like macros with batadv_
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r--net/batman-adv/main.h20
1 files changed, 10 insertions, 10 deletions
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,
190} 190}
191#endif 191#endif
192 192
193#define bat_info(net_dev, fmt, arg...) \ 193#define batadv_info(net_dev, fmt, arg...) \
194 do { \ 194 do { \
195 struct net_device *_netdev = (net_dev); \ 195 struct net_device *_netdev = (net_dev); \
196 struct bat_priv *_batpriv = netdev_priv(_netdev); \ 196 struct bat_priv *_batpriv = netdev_priv(_netdev); \
197 batadv_dbg(DBG_ALL, _batpriv, fmt, ## arg); \ 197 batadv_dbg(DBG_ALL, _batpriv, fmt, ## arg); \
198 pr_info("%s: " fmt, _netdev->name, ## arg); \ 198 pr_info("%s: " fmt, _netdev->name, ## arg); \
199 } while (0) 199 } while (0)
200#define bat_err(net_dev, fmt, arg...) \ 200#define batadv_err(net_dev, fmt, arg...) \
201 do { \ 201 do { \
202 struct net_device *_netdev = (net_dev); \ 202 struct net_device *_netdev = (net_dev); \
203 struct bat_priv *_batpriv = netdev_priv(_netdev); \ 203 struct bat_priv *_batpriv = netdev_priv(_netdev); \
@@ -226,10 +226,10 @@ static inline bool batadv_has_timed_out(unsigned long timestamp,
226 return time_is_before_jiffies(timestamp + msecs_to_jiffies(timeout)); 226 return time_is_before_jiffies(timestamp + msecs_to_jiffies(timeout));
227} 227}
228 228
229#define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0) 229#define batadv_atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0)
230 230
231/* Returns the smallest signed integer in two's complement with the sizeof x */ 231/* Returns the smallest signed integer in two's complement with the sizeof x */
232#define smallest_signed_int(x) (1u << (7u + 8u * (sizeof(x) - 1u))) 232#define batadv_smallest_signed_int(x) (1u << (7u + 8u * (sizeof(x) - 1u)))
233 233
234/* Checks if a sequence number x is a predecessor/successor of y. 234/* Checks if a sequence number x is a predecessor/successor of y.
235 * they handle overflows/underflows and can correctly check for a 235 * they handle overflows/underflows and can correctly check for a
@@ -241,12 +241,12 @@ static inline bool batadv_has_timed_out(unsigned long timestamp,
241 * - when adding 128 - it is neither a predecessor nor a successor, 241 * - when adding 128 - it is neither a predecessor nor a successor,
242 * - after adding more than 127 to the starting value - it is a successor 242 * - after adding more than 127 to the starting value - it is a successor
243 */ 243 */
244#define seq_before(x, y) ({typeof(x) _d1 = (x); \ 244#define batadv_seq_before(x, y) ({typeof(x) _d1 = (x); \
245 typeof(y) _d2 = (y); \ 245 typeof(y) _d2 = (y); \
246 typeof(x) _dummy = (_d1 - _d2); \ 246 typeof(x) _dummy = (_d1 - _d2); \
247 (void) (&_d1 == &_d2); \ 247 (void) (&_d1 == &_d2); \
248 _dummy > smallest_signed_int(_dummy); }) 248 _dummy > batadv_smallest_signed_int(_dummy); })
249#define seq_after(x, y) seq_before(y, x) 249#define batadv_seq_after(x, y) batadv_seq_before(y, x)
250 250
251/* Stop preemption on local cpu while incrementing the counter */ 251/* Stop preemption on local cpu while incrementing the counter */
252static inline void batadv_add_counter(struct bat_priv *bat_priv, size_t idx, 252static inline void batadv_add_counter(struct bat_priv *bat_priv, size_t idx,