From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Lothar Rubusch <l.rubusch@gmail.com>,
mazziesaccount@gmail.com, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] iio: adc: ti-adc128s052: replace literal by unit expression
Date: Thu, 26 Jun 2025 19:22:36 +0100 [thread overview]
Message-ID: <20250626192236.7bd51d18@jic23-huawei> (raw)
In-Reply-To: <aFw4kesQt4WMt2uK@smile.fi.intel.com>
On Wed, 25 Jun 2025 20:57:37 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Wed, Jun 25, 2025 at 05:02:18PM +0000, Lothar Rubusch wrote:
> > Replace the literal number 1000 by MILLI from linux/units.h
>
> Yeah, but with this units (mV, uV, mA, uA) it would probably better to have
> dedicated definitions, like we have for Hz, s and maybe something else
> (bytes?).
I'm not that keen on us getting loads unit specific conversion factors.
From a code readability point of view (given my wish to avoid lots
and lots of unit specific defines) I'd favour using
MICRO / MILLI here and let the compiler resolve that to 1000
>
next prev parent reply other threads:[~2025-06-26 18:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 17:02 [PATCH v1 0/2] iio: adc: ti-adc128s052: add support for TI's ADC121s021 Lothar Rubusch
2025-06-25 17:02 ` [PATCH v1 1/2] iio: adc: ti-adc128s052: add support for adc121s021 Lothar Rubusch
2025-06-25 17:55 ` Andy Shevchenko
2025-06-26 5:24 ` Matti Vaittinen
2025-06-26 18:28 ` Jonathan Cameron
2025-06-26 21:33 ` Lothar Rubusch
2025-06-27 16:27 ` David Lechner
2025-06-28 15:29 ` Jonathan Cameron
2025-06-29 0:00 ` Sukrut Bellary
2025-06-29 16:13 ` Lothar Rubusch
2025-06-29 19:32 ` Sukrut Bellary
2025-06-27 16:33 ` David Lechner
2025-06-25 17:02 ` [PATCH v1 2/2] iio: adc: ti-adc128s052: replace literal by unit expression Lothar Rubusch
2025-06-25 17:57 ` Andy Shevchenko
2025-06-26 18:22 ` Jonathan Cameron [this message]
2025-06-26 5:07 ` Matti Vaittinen
2025-06-26 18:20 ` Jonathan Cameron
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=20250626192236.7bd51d18@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=l.rubusch@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mazziesaccount@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