diff options
author | Guido MartÃnez <guido@vanguardiasur.com.ar> | 2014-04-02 14:53:01 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-18 16:09:32 -0700 |
commit | c720dadab70daf9005c85b084a3f7e983f0fb0cb (patch) | |
tree | 87cddcdab913ceca3c0e503d8465dcb11eddceb7 /drivers/staging/vt6655 | |
parent | f2ca407b9677eb24e824dc78586d102d8c57f37d (diff) |
staging: vt6655: fix DBG_PRT and PRINT_K macros
Wrap both macros inside a 'do { ... } while(0)' to prevent breakage if
used within another 'if'. Also fix a usage of DBG_PRT with a missing
semicolon.
Signed-off-by: Guido MartÃnez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r-- | drivers/staging/vt6655/device.h | 13 | ||||
-rw-r--r-- | drivers/staging/vt6655/wpactl.c | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index 062c3a374b9..985c3c19a4a 100644 --- a/drivers/staging/vt6655/device.h +++ b/drivers/staging/vt6655/device.h @@ -148,8 +148,17 @@ /*--------------------- Export Types ------------------------------*/ -#define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); } -#define PRINT_K(p, args...) { if (PRIVATE_Message) printk(p, ##args); } +#define DBG_PRT(l, p, args...) \ +do { \ + if (l <= msglevel) \ + printk(p, ##args); \ +} while (0) + +#define PRINT_K(p, args...) \ +do { \ + if (PRIVATE_Message) \ + printk(p, ##args); \ +} while (0) //0:11A 1:11B 2:11G typedef enum _VIA_BB_TYPE diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index 9f0715cc636..a3a663fd7af 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -680,7 +680,7 @@ static int wpa_get_scan(PSDevice pDevice, ret = -EFAULT; } param->u.scan_results.scan_count = count; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count) + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count); kfree(pBuf); return ret; |