From: Guido Martínez Date: Wed, 2 Apr 2014 17:53:01 +0000 (-0300) Subject: staging: vt6655: fix DBG_PRT and PRINT_K macros X-Git-Tag: next-20140428~14^2~256 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c720dadab70daf9005c85b084a3f7e983f0fb0cb;p=karo-tx-linux.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index 062c3a374b99..985c3c19a4a7 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 9f0715cc6367..a3a663fd7afa 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;