[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220610095312.kjr3hgpm7cfi53i7@mobilestation>
Date: Fri, 10 Jun 2022 12:53:12 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Serge Semin <Sergey.Semin@...kalelectronics.ru>
Cc: Philipp Zabel <p.zabel@...gutronix.de>,
Hoan Tran <hoan@...amperecomputing.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpio: dwapb: Don't print error on -EPROBE_DEFER
On Fri, Jun 10, 2022 at 10:51:52AM +0300, Serge Semin wrote:
> Currently if the APB or Debounce clocks aren't yet ready to be requested
> the DW GPIO driver will correctly handle that by deferring the probe
> procedure, but the error is still printed to the system log. It needlessly
> pollutes the log since there was no real error but a request to postpone
> the clock request procedure since the clocks subsystem hasn't been fully
> initialized yet. Let's fix that by using the dev_err_probe method to print
> the APB/clock request error status. It will correctly handle the deferred
> probe situation and print the error if it actually happens.
>
> Signed-off-by: Serge Semin <Sergey.Semin@...kalelectronics.ru>
> ---
> drivers/gpio/gpio-dwapb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
> index b0f3aca61974..a51458be34a9 100644
> --- a/drivers/gpio/gpio-dwapb.c
> +++ b/drivers/gpio/gpio-dwapb.c
> @@ -653,7 +653,7 @@ static int dwapb_get_clks(struct dwapb_gpio *gpio)
> err = devm_clk_bulk_get_optional(gpio->dev, DWAPB_NR_CLOCKS,
> gpio->clks);
> if (err) {
> - dev_err(gpio->dev, "Cannot get APB/Debounce clocks\n");
> + dev_err_probe(gpio->dev, err, "Cannot get APB/Debounce clocks\n");
As Philipp correctly pointed out here:
https://lore.kernel.org/lkml/20220610080103.10689-1-Sergey.Semin@baikalelectronics.ru/
This can be shortened out by directly returning a value returned by
the dev_err_probe() method. I'll fix that in v2.
-Sergey
> return err;
> }
>
> --
> 2.35.1
>
Powered by blists - more mailing lists