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: v3.16-rc1~30^2~36^2~1374 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c720dadab70daf9005c85b084a3f7e983f0fb0cb;p=platform%2Fkernel%2Flinux-exynos.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 062c3a3..985c3c1 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 9f0715c..a3a663f 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;