Re: [PATCH 4/4] regulator: ltm8054: Support output current limit control

Andy Shevchenko
2025-09-17T07:02:10Z

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:

First of all, please remove unneeded context (which is assumed you agree with)
in the replies. It makes reviewers' life much easier.

...

> > /*
> > * 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;

--
With Best Regards,
Andy Shevchenko