All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>,
	antoniu.miclaus@analog.com, lars@metafoo.de,
	Michael.Hennerich@analog.com, dlechner@baylibre.com,
	nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: adc: qcom-spmi-adc5-gen3: remove redundant OR with zero
Date: Thu, 19 Mar 2026 19:50:20 +0000	[thread overview]
Message-ID: <20260319195020.789fed7f@jic23-huawei> (raw)
In-Reply-To: <abu-21Hi5eXkuGkQ@ashevche-desk.local>

On Thu, 19 Mar 2026 11:16:11 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Thu, Mar 19, 2026 at 12:57:42PM +0400, Giorgi Tchankvetadze wrote:
> > The expression 'ADC5_GEN3_CHAN_CONV_REQ | 0' is redundant because
> > OR-ing any value with zero does nothing. Remove the pointless '| 0'
> > to simplify the code.  
> 
> Have you read the comment above?
> 
> ...
> 
> >  	 * Use channel 0 by default for immediate conversion and to indicate  
> 
> ^^^
> 
> >  	 * there is an actual conversion request
> >  	 */  
> 
> I believe this is done for clarity. No need to have this patch, but I won't
> object going it in, since the comment still stays. I leave it to Jonathan,
> but I'm not going to give any tag here.
> 
Without the 0 it might appear that the comment was talking about what was
explicitly set in what was left. So ADC5_GEN3_CHAN_CONV_REQ hich would be
misleading.  So short of saying in the comment that the 0 is another field
in the same register I don't see this being conveyed as well by comments as
the code is doing.

Thanks,

Jonathan




      parent reply	other threads:[~2026-03-19 19:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19  8:57 [PATCH] iio: adc: qcom-spmi-adc5-gen3: remove redundant OR with zero Giorgi Tchankvetadze
2026-03-19  9:16 ` Andy Shevchenko
2026-03-19  9:20   ` Andy Shevchenko
2026-03-19  9:58     ` Giorgi Tchankvetadze
2026-03-19 19:50   ` Jonathan Cameron [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=20260319195020.789fed7f@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=giorgitchankvetadze1997@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.