lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aMpdRhAh9g71dt7M@smile.fi.intel.com>
Date: Wed, 17 Sep 2025 10:03:34 +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 Wed, Sep 17, 2025 at 10:02:03AM +0300, Andy Shevchenko wrote:
> On Tue, Sep 16, 2025 at 04:27:25PM +0200, 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:

...

> > > /*
> > >  * Besides missing period at the end this is not correct multi-line style of
> > > * the comments. Use this example.
> > >  */
> > > 
> > > > +	tmp = LTM8054_MIN_CTL_V * (u64)priv->max_uA;
> > 
> > This cast avoids an overflow of the multiplication, since the result may
> > easily exceed 32 bytes in size.
> 
> It's better to read in a way of
> 
> 	tmp = (u64)priv->max_uA * LTM8054_MIN_CTL_mV;

I just realised that in previous mails and here I meant _uV postfix for the
predefined voltage thresholds. Sorry for the confusion.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ