From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939556AbdD1Jmp (ORCPT ); Fri, 28 Apr 2017 05:42:45 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:57233 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938407AbdD1Jmh (ORCPT ); Fri, 28 Apr 2017 05:42:37 -0400 X-ME-Sender: X-Sasl-enc: NxSHE9p5ws9KtdP+kIBPHdxChMkCgrHcpD38hBiSit/I 1493372556 Date: Fri, 28 Apr 2017 11:42:27 +0200 From: "greg@kroah.com" To: Rishiraj Manwatkar Cc: "andreas.dilger@intel.com" , "oleg.drokin@intel.com" , "lustre-devel@lists.lustre.org" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" Subject: Re: [Patch v4 1/2] staging/lustre: add parenthesis to macro argument Message-ID: <20170428094227.GA7739@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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