* [PATCH -next] gpio: Remove redundant dev_err_probe()
@ 2023-07-27 9:14 Ruan Jinjie
2023-07-27 10:11 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Ruan Jinjie @ 2023-07-27 9:14 UTC (permalink / raw)
To: j-keerthy, linus.walleij, brgl, andy, grygorii.strashko, ssantosh,
khilman, linux-gpio, linux-omap
Cc: ruanjinjie
There is no need to call the dev_err_probe() function directly to print
a custom message when handling an error from platform_get_irq() function as
it is going to display an appropriate error message in case of a failure.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
drivers/gpio/gpio-davinci.c | 2 +-
drivers/gpio/gpio-omap.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index fff510d86e31..8db5717bdabe 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -236,7 +236,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
for (i = 0; i < nirq; i++) {
chips->irqs[i] = platform_get_irq(pdev, i);
if (chips->irqs[i] < 0)
- return dev_err_probe(dev, chips->irqs[i], "IRQ not populated\n");
+ return chips->irqs[i];
}
chips->chip.label = dev_name(dev);
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 2b78fde74e30..21c8cfedfd64 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1415,7 +1415,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
if (bank->irq <= 0) {
if (!bank->irq)
bank->irq = -ENXIO;
- return dev_err_probe(dev, bank->irq, "can't get irq resource\n");
+ return bank->irq;
}
bank->chip.parent = dev;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] gpio: Remove redundant dev_err_probe()
2023-07-27 9:14 [PATCH -next] gpio: Remove redundant dev_err_probe() Ruan Jinjie
@ 2023-07-27 10:11 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2023-07-27 10:11 UTC (permalink / raw)
To: Ruan Jinjie
Cc: j-keerthy, linus.walleij, brgl, grygorii.strashko, ssantosh,
khilman, linux-gpio, linux-omap
On Thu, Jul 27, 2023 at 05:14:46PM +0800, Ruan Jinjie wrote:
> There is no need to call the dev_err_probe() function directly to print
> a custom message when handling an error from platform_get_irq() function as
> it is going to display an appropriate error message in case of a failure.
Please, split on per-driver basis.
The code wise it's okay, you may add to each patch in v2
Reviewed-by: Andy Shevchenko <andy@kernel.org>
> drivers/gpio/gpio-davinci.c | 2 +-
> drivers/gpio/gpio-omap.c | 2 +-
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-27 10:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27 9:14 [PATCH -next] gpio: Remove redundant dev_err_probe() Ruan Jinjie
2023-07-27 10:11 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).