summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43legacy/b43legacy.h
diff options
context:
space:
mode:
authorStefano Brivio <stefano.brivio@polimi.it>2008-02-08 08:31:39 +0300
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 23:37:06 +0300
commit4688be308f35f1e0099140a179d95c5e63b2319d (patch)
tree56212f2e95edd9d20fe5deadd9679b69552caa0a /drivers/net/wireless/b43legacy/b43legacy.h
parenta297170dae2595f31b02e4553a3b217e115a15cf (diff)
downloadlinux-4688be308f35f1e0099140a179d95c5e63b2319d.tar.xz
b43legacy: fix B43legacy_WARN_ON macro
Fix the B43legacy_WARN_ON macro so that it will evaluate expressions. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy/b43legacy.h')
-rw-r--r--drivers/net/wireless/b43legacy/b43legacy.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h
index 17abf3cb2b1f..6a63a6e474f7 100644
--- a/drivers/net/wireless/b43legacy/b43legacy.h
+++ b/drivers/net/wireless/b43legacy/b43legacy.h
@@ -330,15 +330,7 @@ enum {
# undef assert
#endif
#ifdef CONFIG_B43LEGACY_DEBUG
-# define B43legacy_WARN_ON(expr) \
- do { \
- if (unlikely((expr))) { \
- printk(KERN_INFO PFX "Test (%s) failed at:" \
- " %s:%d:%s()\n", \
- #expr, __FILE__, \
- __LINE__, __FUNCTION__); \
- } \
- } while (0)
+# define B43legacy_WARN_ON(x) WARN_ON(x)
# define B43legacy_BUG_ON(expr) \
do { \
if (unlikely((expr))) { \
@@ -349,7 +341,9 @@ enum {
} while (0)
# define B43legacy_DEBUG 1
#else
-# define B43legacy_WARN_ON(x) do { /* nothing */ } while (0)
+/* This will evaluate the argument even if debugging is disabled. */
+static inline bool __b43legacy_warn_on_dummy(bool x) { return x; }
+# define B43_WARN_ON(x) __b43legacy_warn_on_dummy(unlikely(!!(x)))
# define B43legacy_BUG_ON(x) do { /* nothing */ } while (0)
# define B43legacy_DEBUG 0
#endif