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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221016172041.2c7fa721@jic23-huawei>
Date:   Sun, 16 Oct 2022 17:20:41 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     "Sa, Nuno" <Nuno.Sa@...log.com>
Cc:     Matti Vaittinen <mazziesaccount@...il.com>,
        Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        "Hennerich, Michael" <Michael.Hennerich@...log.com>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 14/14] iio: hmc425a: simplify using
 devm_regulator_get_enable()

On Tue, 30 Aug 2022 13:55:38 +0000
"Sa, Nuno" <Nuno.Sa@...log.com> wrote:

> > -----Original Message-----
> > From: Matti Vaittinen <mazziesaccount@...il.com>
> > Sent: Tuesday, August 30, 2022 3:00 PM
> > To: Sa, Nuno <Nuno.Sa@...log.com>; Matti Vaittinen
> > <matti.vaittinen@...rohmeurope.com>
> > Cc: Lars-Peter Clausen <lars@...afoo.de>; Hennerich, Michael
> > <Michael.Hennerich@...log.com>; Jonathan Cameron
> > <jic23@...nel.org>; linux-iio@...r.kernel.org; linux-
> > kernel@...r.kernel.org
> > Subject: Re: [PATCH v3 14/14] iio: hmc425a: simplify using
> > devm_regulator_get_enable()
> > 
> > [External]
> > 
> > On 8/30/22 14:49, Sa, Nuno wrote:  
> > >  
> > >> From: Matti Vaittinen <mazziesaccount@...il.com>
> > >> Sent: Friday, August 19, 2022 9:21 PM
> > >> To: Matti Vaittinen <mazziesaccount@...il.com>; Matti Vaittinen
> > >> <matti.vaittinen@...rohmeurope.com>
> > >> Cc: Lars-Peter Clausen <lars@...afoo.de>; Hennerich, Michael
> > >> <Michael.Hennerich@...log.com>; Jonathan Cameron
> > >> <jic23@...nel.org>; linux-iio@...r.kernel.org; linux-
> > >> kernel@...r.kernel.org
> > >> Subject: [PATCH v3 14/14] iio: hmc425a: simplify using
> > >> devm_regulator_get_enable()
> > >>
> > >> [External]
> > >>
> > >> Drop open-coded pattern: 'devm_regulator_get(),  
> > regulator_enable(),  
> > >> add_action_or_reset(regulator_disable)' and use the
> > >> devm_regulator_get_enable() and drop the pointer to the  
> > regulator.  
> > >> This simplifies code and makes it less tempting to add manual  
> > control  
> > >> for the regulator which is also controlled by devm.
> > >>
> > >> Signed-off-by: Matti Vaittinen <mazziesaccount@...il.com>
> > >>
> > >> ---  
> > >
> > > Acked-by: Nuno Sá <nuno.sa@...log.com>
> > >
> > > (I see that in this patch you are not using dev_err_probe(). Maybe  
> > some  
> > > consistency in the series and where applicable would be appropriate  
> > :))
> > 
> > I don't think the driver did originally print an error if regulator get
> > or enable failed. I didn't want to add any new prints - just converted
> > the existing ones to use dev_err_probe(). I believe adding new prints
> > would've been somewhat unrelated change :)
> >   
> 
> Ahh that makes sense. I failed to see the print that you were replacing
> in the ad7606 patch...
> 
Applied to the togreg branch of iio.git though for now that's just pushed
out as testing.

As I mentioned on an earlier patch I forgot these existed and was about
to duplicate some of the work..  Anyhow, we only overlapped on a few
patches so I'll send the rest of my set out shortly.

There are probably other cases still in IIO but they are fiddly to grep
for!

Jonathan
> - Nuno Sá

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ