summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/nes/nes.h
diff options
context:
space:
mode:
authorChien Tung <chien.tin.tung@intel.com>2008-11-21 20:51:01 -0600
committerRoland Dreier <rolandd@cisco.com>2008-12-05 11:00:41 -0800
commit6098d107499e1335f899bfcb558253fb7ee4f73f (patch)
tree91887e03690c253ff5c591d5f95439c03fe113c1 /drivers/infiniband/hw/nes/nes.h
parent1ee86555b2ad4d16a3c18253b7e4d70d34eb94f3 (diff)
RDMA/nes: Cleanup warnings
Wrap NES_DEBUG and assert macros with do while (0) to avoid ambiguous else. No one is using sk_buff * returned from form_cm_frame(), so drop the return. drop_packet() should not be incrementing reset counter on receiving a FIN. Signed-off-by: Chien Tung <chien.tin.tung@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes.h')
-rw-r--r--drivers/infiniband/hw/nes/nes.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h
index 1595dc7bba9d..13a5bb1a7bcf 100644
--- a/drivers/infiniband/hw/nes/nes.h
+++ b/drivers/infiniband/hw/nes/nes.h
@@ -137,14 +137,18 @@
#ifdef CONFIG_INFINIBAND_NES_DEBUG
#define nes_debug(level, fmt, args...) \
+do { \
if (level & nes_debug_level) \
- printk(KERN_ERR PFX "%s[%u]: " fmt, __func__, __LINE__, ##args)
-
-#define assert(expr) \
-if (!(expr)) { \
- printk(KERN_ERR PFX "Assertion failed! %s, %s, %s, line %d\n", \
- #expr, __FILE__, __func__, __LINE__); \
-}
+ printk(KERN_ERR PFX "%s[%u]: " fmt, __func__, __LINE__, ##args); \
+} while (0)
+
+#define assert(expr) \
+do { \
+ if (!(expr)) { \
+ printk(KERN_ERR PFX "Assertion failed! %s, %s, %s, line %d\n", \
+ #expr, __FILE__, __func__, __LINE__); \
+ } \
+} while (0)
#define NES_EVENT_TIMEOUT 1200000
#else