From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Romain Gantois <romain.gantois@bootlin.com>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-iio@vger.kernel.org
Subject: Re: [PATCH 4/4] regulator: ltm8054: Support output current limit control
Date: Sat, 18 Oct 2025 22:30:14 +0300 [thread overview]
Message-ID: <aPPqxsU43npNC_v0@ashevche-desk.local> (raw)
On Thu, Sep 25, 2025 at 09:54:19AM +0200, Romain Gantois wrote:
> On Tuesday, 16 September 2025 16:27:25 CEST Romain Gantois wrote:
> > On Tuesday, 16 September 2025 15:19:16 CEST Andy Shevchenko wrote:
> > > On Tue, Sep 16, 2025 at 12:24:09PM +0200, Romain Gantois wrote:
...
> > > > CTL pin voltage */ + vdac_uV = (u64)min_uA * LTM8054_MAX_CTL_V;
> > > > + do_div(vdac_uV, priv->max_uA);
> > > > +
> > > > + dev_dbg(&rdev->dev,
> > > > + "Setting current limit to %duA, CTL pin to %duV\n", min_uA,
> > > > (int)vdac_uV);
> > >
> > > Why casting?
> >
> > This one is indeed unnecessary.
>
> My mistake, this cast is required to avoid a compiler warning;
THen provide a proper specifier instead. Casting in printf() is in 99.9% cases
just a pure mistake.
--
With Best Regards,
Andy Shevchenko
next reply other threads:[~2025-10-18 19:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-18 19:30 Andy Shevchenko [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-16 10:24 [PATCH 0/4] Add support for the LTM8054 voltage regulator Romain Gantois
2025-09-16 10:24 ` [PATCH 4/4] regulator: ltm8054: Support output current limit control Romain Gantois
2025-09-16 13:19 ` Andy Shevchenko
2025-09-16 14:27 ` Romain Gantois
2025-09-17 7:02 ` Andy Shevchenko
2025-09-17 7:03 ` Andy Shevchenko
2025-09-25 7:54 ` Romain Gantois
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=aPPqxsU43npNC_v0@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=romain.gantois@bootlin.com \
--cc=thomas.petazzoni@bootlin.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®