On Tue, Apr 01, 2014 at 09:52:11AM -0300, Guido Martínez wrote:
> Parenthesize both macros so they will not break program logic if used
> within another 'if'. Also fix a usage of DBG_PRT with a missing
> semicolon.
>
> Signed-off-by: Guido Martínez <[email protected]>
> ---
> drivers/staging/vt6655/device.h | 4 ++--
> drivers/staging/vt6655/wpactl.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
> index 062c3a3..483b017 100644
> --- a/drivers/staging/vt6655/device.h
> +++ b/drivers/staging/vt6655/device.h
> @@ -148,8 +148,8 @@
>
> /*--------------------- 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...) ({ if (l <= msglevel) printk(p, ##args); })
> +#define PRINT_K(p, args...) ({ if (PRIVATE_Message) printk(p, ##args); })
Use a do { } while(0) for this.
regards,
dan carpenter
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel