mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [Patch v4 1/2] staging/lustre: add parenthesis to macro argument
       [not found] ` <VI1PR0901MB161661F1051BA2598CCE8DA0A4180@VI1PR0901MB1616.eurprd09.prod.outlook.com>
@ 2017-04-28  9:42   ` greg
  0 siblings, 0 replies; only message in thread
From: greg @ 2017-04-28  9:42 UTC (permalink / raw)
  To: Rishiraj Manwatkar
  Cc: andreas.dilger, oleg.drokin, lustre-devel, devel, linux-kernel

On Wed, Apr 19, 2017 at 03:50:05PM +0000, Rishiraj Manwatkar wrote:
> Add parenthesis to cl_io_for_each() macro to avoid potential issues with
> unexpected argument expansion in CPP.
> 
> Signed-off-by: Rishiraj Manwatkar <manwatkar@outlook.com>
> ---
>  v1 -> v2: Added mailing list in cc.
>  v2 -> v3: Changed From: to be same as Signed-off-by:.
>  v3 -> v4: Changed Subject line and patch description as suggested by andreas.dilger@intel.com
>  drivers/staging/lustre/lustre/obdclass/cl_io.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c b/drivers/staging/lustre/lustre/obdclass/cl_io.c
> index ee7d677..0997254 100755
> --- a/drivers/staging/lustre/lustre/obdclass/cl_io.c
> +++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c
> @@ -52,9 +52,9 @@
>   */
>  
>  #define cl_io_for_each(slice, io) \
> -	list_for_each_entry((slice), &io->ci_layers, cis_linkage)
> +	list_for_each_entry((slice), &(io)->ci_layers, cis_linkage)
>  #define cl_io_for_each_reverse(slice, io)		 \
> -	list_for_each_entry_reverse((slice), &io->ci_layers, cis_linkage)
> +	list_for_each_entry_reverse((slice), &(io)->ci_layers, cis_linkage)

No, the original code is correct, that's going to be a variable only,
not any type of "complex argument".

thanks,

greg k-h

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-28  9:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <eff7ffe99acb472d970754b6572573e36bfc8a7f.1492263580>
     [not found] ` <VI1PR0901MB161661F1051BA2598CCE8DA0A4180@VI1PR0901MB1616.eurprd09.prod.outlook.com>
2017-04-28  9:42   ` [Patch v4 1/2] staging/lustre: add parenthesis to macro argument greg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome