From: Ceclan Dumitru <mitrutzceclan@gmail.com>
To: Andy Shevchenko <andy@kernel.org>
Cc: linus.walleij@linaro.org, brgl@bgdev.pl,
linux-gpio@vger.kernel.org,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Jonathan Cameron" <jic23@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Michael Walle" <michael@walle.cc>,
"Arnd Bergmann" <arnd@arndb.de>,
"ChiaEn Wu" <chiaen_wu@richtek.com>,
"Niklas Schnelle" <schnelle@linux.ibm.com>,
"Leonard Göhrs" <l.goehrs@pengutronix.de>,
"Mike Looijmans" <mike.looijmans@topic.nl>,
"Haibo Chen" <haibo.chen@nxp.com>,
"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
"Ceclan Dumitru" <dumitru.ceclan@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 2/2] iio: adc: ad7173: add AD7173 driver
Date: Thu, 14 Dec 2023 13:02:59 +0200 [thread overview]
Message-ID: <fd9f6465-fd72-401e-bcc2-59f775a43d9b@gmail.com> (raw)
In-Reply-To: <ZXm-hf8UQ3VEyP-2@smile.fi.intel.com>
On 12/13/23 16:24, Andy Shevchenko wrote:
> On Tue, Dec 12, 2023 at 12:44:36PM +0200, Dumitru Ceclan wrote:
> ...
>
>> + if (chan->type == IIO_TEMP) {
>> + temp = ((u32)AD7173_VOLTAGE_INT_REF_uV) * MILLI;
>
> Hmm... Is the casting mandatory here?
>
Yep, not really needed as MILLI is already declared as unsigned and it
will promote the _INT_REF as well. On signed32 it would have overflowed.
Are there any cases where this would not be alright?
next prev parent reply other threads:[~2023-12-14 11:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 10:44 [PATCH v8 1/2] dt-bindings: adc: add AD7173 Dumitru Ceclan
2023-12-12 10:44 ` [PATCH v8 2/2] iio: adc: ad7173: add AD7173 driver Dumitru Ceclan
2023-12-13 14:24 ` Andy Shevchenko
2023-12-14 11:02 ` Ceclan Dumitru [this message]
2023-12-14 12:30 ` Jonathan Cameron
2023-12-14 12:57 ` Ceclan Dumitru
2023-12-14 14:47 ` Andy Shevchenko
2023-12-17 13:31 ` Jonathan Cameron
2023-12-12 15:09 ` [PATCH v8 1/2] dt-bindings: adc: add AD7173 David Lechner
2023-12-14 12:43 ` Ceclan Dumitru
2023-12-14 16:12 ` David Lechner
2023-12-14 17:03 ` Ceclan Dumitru
2023-12-17 13:50 ` Jonathan Cameron
2023-12-18 1:00 ` David Lechner
2023-12-20 12:38 ` 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=fd9f6465-fd72-401e-bcc2-59f775a43d9b@gmail.com \
--to=mitrutzceclan@gmail.com \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=chiaen_wu@richtek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dumitru.ceclan@analog.com \
--cc=haibo.chen@nxp.com \
--cc=hvilleneuve@dimonoff.com \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=l.goehrs@pengutronix.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=mike.looijmans@topic.nl \
--cc=robh+dt@kernel.org \
--cc=schnelle@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).