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  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]
Date:   Wed, 9 Sep 2020 21:57:41 +0200
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Jonathan Cameron <jic23@...nel.org>
Cc:     Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Peter Rosin <peda@...ntia.se>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Tomasz Duszynski <tomasz.duszynski@...akon.com>,
        linux-iio@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        linux-arm-kernel@...ts.infradead.org,
        "linux-samsung-soc@...r.kernel.org" 
        <linux-samsung-soc@...r.kernel.org>,
        linux-amlogic@...ts.infradead.org,
        linux-stm32@...md-mailman.stormreply.com,
        Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH v3 08/18] iio: adc: stm32: Simplify with dev_err_probe()

On Wed, 9 Sep 2020 at 20:36, Jonathan Cameron <jic23@...nel.org> wrote:
>
> On Sat, 29 Aug 2020 08:47:16 +0200
> Krzysztof Kozlowski <krzk@...nel.org> wrote:
>
> > Common pattern of handling deferred probe can be simplified with
> > dev_err_probe().  Less code and also it prints the error value.
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
> > Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> >
> I don't have the thread to hand, but this tripped a warning next
> and the patch was dropped as a result. See below.

Thanks for letting me know. If you mean the warning caused by:
https://lore.kernel.org/lkml/20200909073716.GA560912@kroah.com/
then the driver-core patch was dropped, not the iio one:
https://lore.kernel.org/linux-next/20200909074130.GB561485@kroah.com/T/#t

So we are good here :)

Best regards,
Krzysztof

> Jonathan
> > ---
> >
> > Changes since v2:
> > 1. Wrap dev_err_probe() lines at 80 character
> >
> > Changes since v1:
> > 1. Convert to devm_clk_get_optional
> > 2. Update also stm32-dfsdm-core and stm32-dac-core.
> > 3. Wrap around 100 characters (accepted by checkpatch).
> > ---
> >  drivers/iio/adc/stm32-adc-core.c   | 75 ++++++++++--------------------
> >  drivers/iio/adc/stm32-adc.c        | 10 ++--
> >  drivers/iio/adc/stm32-dfsdm-adc.c  | 10 ++--
> >  drivers/iio/adc/stm32-dfsdm-core.c |  9 ++--
> >  drivers/iio/dac/stm32-dac-core.c   |  5 +-
> >  5 files changed, 35 insertions(+), 74 deletions(-)
> >
> > diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
> > index 0e2068ec068b..3f27b4817a42 100644
> > --- a/drivers/iio/adc/stm32-adc-core.c
> > +++ b/drivers/iio/adc/stm32-adc-core.c
> > @@ -582,11 +582,9 @@ static int stm32_adc_core_switches_probe(struct device *dev,
> >       priv->syscfg = syscon_regmap_lookup_by_phandle(np, "st,syscfg");
> >       if (IS_ERR(priv->syscfg)) {
> >               ret = PTR_ERR(priv->syscfg);
> > -             if (ret != -ENODEV) {
> > -                     if (ret != -EPROBE_DEFER)
> > -                             dev_err(dev, "Can't probe syscfg: %d\n", ret);
> > -                     return ret;
> > -             }
> > +             if (ret != -ENODEV)
> > +                     return dev_err_probe(dev, ret, "Can't probe syscfg\n");
> > +
> >               priv->syscfg = NULL;
> >       }
> >
> > @@ -596,12 +594,9 @@ static int stm32_adc_core_switches_probe(struct device *dev,
> >               priv->booster = devm_regulator_get_optional(dev, "booster");
> >               if (IS_ERR(priv->booster)) {
> >                       ret = PTR_ERR(priv->booster);
> > -                     if (ret != -ENODEV) {
> > -                             if (ret != -EPROBE_DEFER)
> > -                                     dev_err(dev, "can't get booster %d\n",
> > -                                             ret);
> > -                             return ret;
> > -                     }
> > +                     if (ret != -ENODEV)
> > +                             dev_err_probe(dev, ret, "can't get booster\n");
>
> This tripped a warning and got the patch dropped because we no longer
> return on error.

Powered by blists - more mailing lists