Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1625420 > unrolled thread

Re: [Patch v3 1/2] lustre: Parantheses added for Macro argument to avoid precedence issues

Started by"greg@kroah.com" <greg@kroah.com>
First post2017-04-18 18:00 +0200
Last post2017-04-19 03:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [Patch v3 1/2] lustre: Parantheses added for Macro argument to  avoid precedence issues "greg@kroah.com" <greg@kroah.com> - 2017-04-18 18:00 +0200
    Re: [Patch v3 1/2] lustre: Parantheses added for Macro argument to  avoid precedence issues "Dilger, Andreas" <andreas.dilger@intel.com> - 2017-04-19 03:30 +0200

#1625420 — Re: [Patch v3 1/2] lustre: Parantheses added for Macro argument to avoid precedence issues

From"greg@kroah.com" <greg@kroah.com>
Date2017-04-18 18:00 +0200
SubjectRe: [Patch v3 1/2] lustre: Parantheses added for Macro argument to avoid precedence issues
Message-ID<txDHQ-7VF-15@gated-at.bofh.it>
On Sat, Apr 15, 2017 at 01:50:42PM +0000, Rishiraj Manwatkar wrote:
> Parantheses are added for Macro argument, to avoid precedence issues.
> 
> 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:.
>  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)

Really?  There is no precedence issues that I can see here, sorry.

thanks,

greg k-h

[toc] | [next] | [standalone]


#1625774

From"Dilger, Andreas" <andreas.dilger@intel.com>
Date2017-04-19 03:30 +0200
Message-ID<txMBs-5g9-21@gated-at.bofh.it>
In reply to#1625420
On Apr 18, 2017, at 09:50, greg@kroah.com wrote:
> 
> On Sat, Apr 15, 2017 at 01:50:42PM +0000, Rishiraj Manwatkar wrote:
>> Subject: [Patch v3 1/2] lustre: Parantheses added for Macro argument to avoid precedence issues

(typo) s/Parantheses/parenthesis/ s/Macro/macro/

The Subject line (excluding [PATCH] part) should be under 60

>> Parantheses are added for Macro argument, to avoid precedence issues.


Should be something like:

Subject: [PATCH v4 1/2] staging/lustre: add parenthesis to macro arguments

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:.
>> 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)
> 
> Really?  There is no precedence issues that I can see here, sorry.


Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web