From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Nithishvelan M <mnithishvelan@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nuno Sa <nuno.sa@analog.com>,
Michael Hennerich <Michael.Hennerich@analog.com>,
David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: iio: impedance-analyzer: ad5933: use guard(mutex) in ad5933_show()
Date: Mon, 26 Oct 2026 11:07:39 +0200 [thread overview]
Message-ID: <at8YW0nzftacwkga@ashevche-desk.local> (raw)
In-Reply-To: <20261026024049.556c6642@jic23-hlaptop>
On Mon, Oct 26, 2026 at 02:40:49AM +0000, Jonathan Cameron wrote:
> On Mon, 19 Oct 2026 22:09:12 +0300
> Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > On Mon, Oct 19, 2026 at 03:02:48PM +0000, Nithishvelan M wrote:
...
> > > case AD5933_IN_PGA_GAIN:
> > > - len = sysfs_emit(buf, "%s\n",
> > > - (st->ctrl_hb & AD5933_CTRL_PGA_GAIN_1) ?
> > > - "1" : "0.2");
> > > - break;
> > > + return sysfs_emit(buf, "%s\n",
> > > + st->ctrl_hb & AD5933_CTRL_PGA_GAIN_1 ? "1" : "0.2");
> >
> > You can (re-)use ridx here as well
> >
> > ridx = st->ctrl_hb & AD5933_CTRL_PGA_GAIN_1;
> > return sysfs_emit(buf, "%s\n", ridx ? "1" : "0.2");
>
> Maybe call it something else here as its not the range index that I can see.
True! I have no idea where the part of my thought went during the previous
reply as I definitely kept in mind and wanted to add something like "(and this
might need a variable renaming)".
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-10-26 9:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 15:02 Nithishvelan M
2026-10-19 19:09 ` Andy Shevchenko
2026-10-26 2:40 ` Jonathan Cameron
2026-10-26 9:07 ` Andy Shevchenko [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-19 5:07 Nithishvelan M
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=at8YW0nzftacwkga@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mnithishvelan@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®