[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Veu+EpM-OY7TOHfBg-HteAmN+vbSfqmkO-2O2-qA4VQTA@mail.gmail.com>
Date: Fri, 28 Aug 2020 13:03:37 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Ray Jui <rjui@...adcom.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Florian Fainelli <f.fainelli@...il.com>,
Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@...adcom.com>,
Keerthy <j-keerthy@...com>,
Grygorii Strashko <grygorii.strashko@...com>,
Santosh Shilimkar <ssantosh@...nel.org>,
Kevin Hilman <khilman@...nel.org>,
Michal Simek <michal.simek@...inx.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 1/6] gpio: bcm-kona: Simplify with dev_err_probe()
On Thu, Aug 27, 2020 at 11:09 PM 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.
>
I believe you are doing this right (after we have discussed previous
series and approaches).
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
for entire series (Linus!)
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
> ---
> drivers/gpio/gpio-bcm-kona.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
> index cf3687a7925f..1e6b427f2c4a 100644
> --- a/drivers/gpio/gpio-bcm-kona.c
> +++ b/drivers/gpio/gpio-bcm-kona.c
> @@ -590,10 +590,7 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
> dev_err(dev, "Couldn't determine # GPIO banks\n");
> return -ENOENT;
> } else if (ret < 0) {
> - if (ret != -EPROBE_DEFER)
> - dev_err(dev, "Couldn't determine GPIO banks: (%pe)\n",
> - ERR_PTR(ret));
> - return ret;
> + return dev_err_probe(dev, ret, "Couldn't determine GPIO banks\n");
> }
> kona_gpio->num_bank = ret;
>
> --
> 2.17.1
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists