All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Peter Rosin <peda@axentia.se>, Kukjin Kim <kgene@kernel.org>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Beniamin Bia <beniamin.bia@analog.com>,
	Tomasz Duszynski <tomasz.duszynski@octakon.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-iio <linux-iio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	linux-samsung-soc@vger.kernel.org,
	linux-amlogic@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH v2 06/18] iio: adc: meson_saradc: Simplify with dev_err_probe()
Date: Thu, 27 Aug 2020 22:48:56 +0300	[thread overview]
Message-ID: <CAHp75Vd8ttMmOx28V3wXv5pY1fbru8aUV=fTBoJyZJ=CQRo7hw@mail.gmail.com> (raw)
In-Reply-To: <20200827192642.1725-6-krzk@kernel.org>

On Thu, Aug 27, 2020 at 10:28 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe().  Less code and also it prints the error value.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/iio/adc/meson_saradc.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
> index 93c2252c0b89..a9d06e8a576a 100644
> --- a/drivers/iio/adc/meson_saradc.c
> +++ b/drivers/iio/adc/meson_saradc.c
> @@ -719,11 +719,8 @@ static int meson_sar_adc_temp_sensor_init(struct iio_dev *indio_dev)
>                 if (ret == -ENODEV)
>                         return 0;
>
> -               if (ret != -EPROBE_DEFER)
> -                       dev_err(indio_dev->dev.parent,
> -                               "failed to get temperature_calib cell\n");
> -
> -               return ret;
> +               return dev_err_probe(indio_dev->dev.parent, ret,
> +                                    "failed to get temperature_calib cell\n");
>         }
>
>         priv->tsc_regmap =
> --
> 2.17.1
>


-- 
With Best Regards,
Andy Shevchenko

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Neil Armstrong <narmstrong@baylibre.com>,
	linux-iio <linux-iio@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Tomasz Duszynski <tomasz.duszynski@octakon.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	Jerome Brunet <jbrunet@baylibre.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Kevin Hilman <khilman@baylibre.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Kukjin Kim <kgene@kernel.org>,
	Beniamin Bia <beniamin.bia@analog.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	linux-samsung-soc@vger.kernel.org,
	linux-amlogic@lists.infradead.org,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Hartmut Knaack <knaack.h@gmx.de>, Peter Rosin <peda@axentia.se>,
	Jonathan Cameron <jic23@kernel.org>
Subject: Re: [PATCH v2 06/18] iio: adc: meson_saradc: Simplify with dev_err_probe()
Date: Thu, 27 Aug 2020 22:48:56 +0300	[thread overview]
Message-ID: <CAHp75Vd8ttMmOx28V3wXv5pY1fbru8aUV=fTBoJyZJ=CQRo7hw@mail.gmail.com> (raw)
In-Reply-To: <20200827192642.1725-6-krzk@kernel.org>

On Thu, Aug 27, 2020 at 10:28 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe().  Less code and also it prints the error value.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/iio/adc/meson_saradc.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
> index 93c2252c0b89..a9d06e8a576a 100644
> --- a/drivers/iio/adc/meson_saradc.c
> +++ b/drivers/iio/adc/meson_saradc.c
> @@ -719,11 +719,8 @@ static int meson_sar_adc_temp_sensor_init(struct iio_dev *indio_dev)
>                 if (ret == -ENODEV)
>                         return 0;
>
> -               if (ret != -EPROBE_DEFER)
> -                       dev_err(indio_dev->dev.parent,
> -                               "failed to get temperature_calib cell\n");
> -
> -               return ret;
> +               return dev_err_probe(indio_dev->dev.parent, ret,
> +                                    "failed to get temperature_calib cell\n");
>         }
>
>         priv->tsc_regmap =
> --
> 2.17.1
>


-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Neil Armstrong <narmstrong@baylibre.com>,
	linux-iio <linux-iio@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Tomasz Duszynski <tomasz.duszynski@octakon.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	Jerome Brunet <jbrunet@baylibre.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Kevin Hilman <khilman@baylibre.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Kukjin Kim <kgene@kernel.org>,
	Beniamin Bia <beniamin.bia@analog.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	linux-samsung-soc@vger.kernel.org,
	linux-amlogic@lists.infradead.org,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Hartmut Knaack <knaack.h@gmx.de>, Peter Rosin <peda@axentia.se>,
	Jonathan Cameron <jic23@kernel.org>
Subject: Re: [PATCH v2 06/18] iio: adc: meson_saradc: Simplify with dev_err_probe()
Date: Thu, 27 Aug 2020 22:48:56 +0300	[thread overview]
Message-ID: <CAHp75Vd8ttMmOx28V3wXv5pY1fbru8aUV=fTBoJyZJ=CQRo7hw@mail.gmail.com> (raw)
In-Reply-To: <20200827192642.1725-6-krzk@kernel.org>

On Thu, Aug 27, 2020 at 10:28 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe().  Less code and also it prints the error value.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/iio/adc/meson_saradc.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
> index 93c2252c0b89..a9d06e8a576a 100644
> --- a/drivers/iio/adc/meson_saradc.c
> +++ b/drivers/iio/adc/meson_saradc.c
> @@ -719,11 +719,8 @@ static int meson_sar_adc_temp_sensor_init(struct iio_dev *indio_dev)
>                 if (ret == -ENODEV)
>                         return 0;
>
> -               if (ret != -EPROBE_DEFER)
> -                       dev_err(indio_dev->dev.parent,
> -                               "failed to get temperature_calib cell\n");
> -
> -               return ret;
> +               return dev_err_probe(indio_dev->dev.parent, ret,
> +                                    "failed to get temperature_calib cell\n");
>         }
>
>         priv->tsc_regmap =
> --
> 2.17.1
>


-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2020-08-27 19:49 UTC|newest]

Thread overview: 141+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 19:26 [PATCH v2 01/18] iio: accel: bma180: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-08-27 19:26 ` Krzysztof Kozlowski
2020-08-27 19:26 ` Krzysztof Kozlowski
2020-08-27 19:26 ` [PATCH v2 02/18] iio: accel: mma8452: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:45   ` Andy Shevchenko
2020-08-27 19:45     ` Andy Shevchenko
2020-08-27 19:45     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 03/18] iio: adc: envelope-detector: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:46   ` Andy Shevchenko
2020-08-27 19:46     ` Andy Shevchenko
2020-08-27 19:46     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 04/18] iio: adc: exynos_adc: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:46   ` Andy Shevchenko
2020-08-27 19:46     ` Andy Shevchenko
2020-08-27 19:46     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 05/18] iio: adc: ltc2497: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:48   ` Andy Shevchenko
2020-08-27 19:48     ` Andy Shevchenko
2020-08-27 19:48     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 06/18] iio: adc: meson_saradc: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:48   ` Andy Shevchenko [this message]
2020-08-27 19:48     ` Andy Shevchenko
2020-08-27 19:48     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 07/18] iio: adc: rcar-gyroadc: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:49   ` Andy Shevchenko
2020-08-27 19:49     ` Andy Shevchenko
2020-08-27 19:49     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 08/18] iio: adc: stm32: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:51   ` Andy Shevchenko
2020-08-27 19:51     ` Andy Shevchenko
2020-08-27 19:51     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 09/18] iio: afe: iio-rescale: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:54   ` Andy Shevchenko
2020-08-27 19:54     ` Andy Shevchenko
2020-08-27 19:54     ` Andy Shevchenko
2020-08-27 21:46   ` Peter Rosin
2020-08-27 21:46     ` Peter Rosin
2020-08-27 21:46     ` Peter Rosin
2020-08-28  6:24     ` Krzysztof Kozlowski
2020-08-28  6:24       ` Krzysztof Kozlowski
2020-08-28  6:24       ` Krzysztof Kozlowski
2020-08-28  6:57       ` Peter Rosin
2020-08-28  6:57         ` Peter Rosin
2020-08-28  6:57         ` Peter Rosin
2020-08-28  7:03         ` Krzysztof Kozlowski
2020-08-28  7:03           ` Krzysztof Kozlowski
2020-08-28  7:03           ` Krzysztof Kozlowski
2020-08-28  9:39           ` Peter Rosin
2020-08-28  9:39             ` Peter Rosin
2020-08-28  9:39             ` Peter Rosin
2020-08-28 17:51             ` Joe Perches
2020-08-28 17:51               ` Joe Perches
2020-08-28 17:51               ` Joe Perches
2020-08-28  8:25     ` Andy Shevchenko
2020-08-28  8:25       ` Andy Shevchenko
2020-08-28  8:25       ` Andy Shevchenko
2020-08-28  9:39       ` Peter Rosin
2020-08-28  9:39         ` Peter Rosin
2020-08-28  9:39         ` Peter Rosin
2020-08-27 19:26 ` [PATCH v2 10/18] iio: amplifiers: hmc425a: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:55   ` Andy Shevchenko
2020-08-27 19:55     ` Andy Shevchenko
2020-08-27 19:55     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 11/18] iio: chemical: scd30: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:55   ` Andy Shevchenko
2020-08-27 19:55     ` Andy Shevchenko
2020-08-27 19:55     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 12/18] iio: dac: dpot-dac: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:55   ` Andy Shevchenko
2020-08-27 19:55     ` Andy Shevchenko
2020-08-27 19:55     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 13/18] iio: imu: inv_mpu6050: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:59   ` Andy Shevchenko
2020-08-27 19:59     ` Andy Shevchenko
2020-08-27 19:59     ` Andy Shevchenko
2020-08-28  6:36   ` Jean-Baptiste Maneyrol
2020-08-28  6:36     ` Jean-Baptiste Maneyrol
2020-08-28  6:36     ` Jean-Baptiste Maneyrol
2020-08-27 19:26 ` [PATCH v2 14/18] iio: light: isl29018: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 20:00   ` Andy Shevchenko
2020-08-27 20:00     ` Andy Shevchenko
2020-08-27 20:00     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 15/18] iio: light: tsl2772: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 20:00   ` Andy Shevchenko
2020-08-27 20:00     ` Andy Shevchenko
2020-08-27 20:00     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 16/18] iio: magnetometer: ak8974: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 20:01   ` Andy Shevchenko
2020-08-27 20:01     ` Andy Shevchenko
2020-08-27 20:01     ` Andy Shevchenko
2020-08-28 14:33   ` Linus Walleij
2020-08-28 14:33     ` Linus Walleij
2020-08-28 14:33     ` Linus Walleij
2020-08-27 19:26 ` [PATCH v2 17/18] iio: magnetometer: mag3110: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 20:01   ` Andy Shevchenko
2020-08-27 20:01     ` Andy Shevchenko
2020-08-27 20:01     ` Andy Shevchenko
2020-08-27 19:26 ` [PATCH v2 18/18] iio: magnetometer: iio-mux: " Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 19:26   ` Krzysztof Kozlowski
2020-08-27 20:02   ` Andy Shevchenko
2020-08-27 20:02     ` Andy Shevchenko
2020-08-27 20:02     ` Andy Shevchenko
2020-08-27 21:52   ` Peter Rosin
2020-08-27 21:52     ` Peter Rosin
2020-08-27 21:52     ` Peter Rosin
2020-08-27 19:38 ` [PATCH v2 01/18] iio: accel: bma180: " Andy Shevchenko
2020-08-27 19:38   ` Andy Shevchenko
2020-08-27 19:38   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHp75Vd8ttMmOx28V3wXv5pY1fbru8aUV=fTBoJyZJ=CQRo7hw@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandre.torgue@st.com \
    --cc=beniamin.bia@analog.com \
    --cc=jbrunet@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=kgene@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=knaack.h@gmx.de \
    --cc=krzk@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=marek.vasut@gmail.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=narmstrong@baylibre.com \
    --cc=peda@axentia.se \
    --cc=pmeerw@pmeerw.net \
    --cc=tomasz.duszynski@octakon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.