public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Petrigo <vladimir.petrigo@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Nishad Kamdar <nishadkamdar@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Stefan Popa <stefan.popa@analog.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Renato Lui Geh <renatogeh@gmail.com>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>,
	Slawomir Stepien <sst@poczta.fm>,
	Jonathan Cameron <jic23@kernel.org>
Subject: Re: [PATCH 3/3] staging: iio: ad7780: Add parentheses to macros
Date: Fri, 22 Mar 2019 00:12:41 +0300	[thread overview]
Message-ID: <20190321211240.GA22504@ubuntu> (raw)
In-Reply-To: <20190320074217.GE2202@kadam>

On Wed, Mar 20, 2019 at 10:42:17AM +0300, Dan Carpenter wrote:
> On Sun, Mar 17, 2019 at 11:53:12PM +0300, Vladimir Petrigo wrote:
> > - Fix CHECK Macro argument 'wordsize' may be better as '(wordsize)' to avoid precedence issues
> > - Fix CHECK Macro argument reuse 'bits' - possible side-effects?
> > 
> > Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
> > ---
> >  drivers/staging/iio/adc/ad7780.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c
> > index c4a8578..2dfd6f8 100644
> > --- a/drivers/staging/iio/adc/ad7780.c
> > +++ b/drivers/staging/iio/adc/ad7780.c
> > @@ -142,7 +142,7 @@ static const struct ad_sigma_delta_info ad7780_sigma_delta_info = {
> >  };
> >  
> >  #define AD7780_CHANNEL(bits, wordsize) \
> > -	AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, bits, 32, wordsize - bits)
> > +	AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, (bits), 32, ((wordsize) - (bits)))
>                                             ^^^^^^
> These parentheses are not required.
> 
> This doesn't fix the "argument reuse" issue...  It's not a reall issue
> though, and it isn't like this a core macro so it doesn't really matter
> too much.
> 
> regards,
> dan carpenter
> 
Thank you for the reply. I'll get rid of that parentheses in the v2

Best regards,
Vladimir Petrigo

      reply	other threads:[~2019-03-21 21:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-17 20:53 [PATCH 0/3] Code formatting clean up Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 1/3] staging: iio: ad7192: Fix style issue Vladimir Petrigo
2019-03-18  2:27   ` Phil Reid
2019-03-19  8:14     ` Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 2/3] staging: iio: ad7280a: Add parentheses to macros Vladimir Petrigo
2019-03-20  7:38   ` Dan Carpenter
2019-03-21 21:14     ` Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 3/3] staging: iio: ad7780: " Vladimir Petrigo
2019-03-20  7:42   ` Dan Carpenter
2019-03-21 21:12     ` Vladimir Petrigo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190321211240.GA22504@ubuntu \
    --to=vladimir.petrigo@gmail.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=nishadkamdar@gmail.com \
    --cc=pmeerw@pmeerw.net \
    --cc=renatogeh@gmail.com \
    --cc=sst@poczta.fm \
    --cc=stefan.popa@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox