diff options
author | Chien Tung <chien.tin.tung@intel.com> | 2008-11-22 02:51:01 (GMT) |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-12-05 19:00:41 (GMT) |
commit | 6098d107499e1335f899bfcb558253fb7ee4f73f (patch) | |
tree | 91887e03690c253ff5c591d5f95439c03fe113c1 /drivers/infiniband/hw/nes/nes.h | |
parent | 1ee86555b2ad4d16a3c18253b7e4d70d34eb94f3 (diff) | |
download | linux-fsl-qoriq-6098d107499e1335f899bfcb558253fb7ee4f73f.tar.xz |
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.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h index 1595dc7..13a5bb1 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 |