[PATCH] staging: rtl8188eu: Macro should be enclosed

Sebastian Haas sehaas at deebas.com
Sat Apr 1 07:24:58 UTC 2017


Hi Alfonso,

On Wed, Mar 29, 2017 at 07:50:11PM +0100, alfonsolimaastor at gmail.com wrote:
> diff --git a/drivers/staging/rtl8188eu/include/odm_debug.h b/drivers/staging/rtl8188eu/include/odm_debug.h
> index 687ff3e..fd92f7e 100644
> --- a/drivers/staging/rtl8188eu/include/odm_debug.h
> +++ b/drivers/staging/rtl8188eu/include/odm_debug.h
> @@ -86,11 +86,13 @@
>  #endif
>  
>  #define ODM_RT_TRACE(pDM_Odm, comp, level, fmt)				\
> -	if (((comp) & pDM_Odm->DebugComponents) &&			\
> -	    (level <= pDM_Odm->DebugLevel)) {				\
> -		pr_info("[ODM-8188E] ");				\
> -		RT_PRINTK fmt;						\
> -	}
> +	do {								\
> +		if (((comp) & pDM_Odm->DebugComponents) &&		\
> +		    (level <= pDM_Odm->DebugLevel)) {			\
> +			pr_info("[ODM-8188E] ");			\
> +			RT_PRINTK fmt;					\
> +		}							\
> +	} while (0)

isn't the if-statement already a single block?
I don't think the do-while adds any improvement.

/sebastian



More information about the devel mailing list