[<prev] [next>] [day] [month] [year] [list]
Message-ID: <aPPqxsU43npNC_v0@ashevche-desk.local>
Date: Sat, 18 Oct 2025 22:30:14 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Romain Gantois <romain.gantois@...tlin.com>
Cc: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-iio@...r.kernel.org
Subject: Re: [PATCH 4/4] regulator: ltm8054: Support output current limit
control
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
Powered by blists - more mailing lists