Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Pan Chuang <panchuang@vivo.com>
Cc: "Linus Walleij" <linusw@kernel.org>,
	"Bartosz Golaszewski" <brgl@kernel.org>,
	"Doug Berger" <opendmb@gmail.com>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>,
	"Hoan Tran" <hoan@os.amperecomputing.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"André Draszik" <andre.draszik@linaro.org>,
	"Ming Yu" <tmyu0@nuvoton.com>, "Orson Zhai" <orsonzhai@gmail.com>,
	"Baolin Wang" <baolin.wang@linux.alibaba.com>,
	"Chunyan Zhang" <zhang.lyra@gmail.com>,
	"Robert Jarzmik" <robert.jarzmik@free.fr>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Yixun Lan" <dlan@kernel.org>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Kuppuswamy Sathyanarayanan"
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	"Ray Jui" <rjui@broadcom.com>,
	"Scott Branden" <sbranden@broadcom.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>,
	"moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	"open list:ARM/RISC-V/RENESAS ARCHITECTURE"
	<linux-renesas-soc@vger.kernel.org>,
	"open list:RISC-V SPACEMIT SoC Support"
	<linux-riscv@lists.infradead.org>,
	"open list:RISC-V SPACEMIT SoC Support"
	<spacemit@lists.linux.dev>,
	"moderated list:ARM/STM32 ARCHITECTURE"
	<linux-stm32@st-md-mailman.stormreply.com>
Subject: Re: [PATCH] gpio: Remove redundant dev_err()/dev_err_probe()
Date: Fri, 17 Jul 2026 13:23:32 +0300	[thread overview]
Message-ID: <aloCpCgDYjps9yQu@ashevche-desk.local> (raw)
In-Reply-To: <20260717083037.284134-1-panchuang@vivo.com>

On Fri, Jul 17, 2026 at 04:30:33PM +0800, Pan Chuang wrote:
> Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in
> devm_request_*_irq()"), devm_request_irq() and devm_request_threaded_irq()
> automatically log detailed error messages on failure. Remove the
> now-redundant driver-specific dev_err() and dev_err_probe() calls.


...

> -	if (err != 0) {
> -		dev_err(chip->parent, "can't request IRQ#%d: %d\n",
> -			adnp->client->irq, err);
> +	if (err != 0)

This style is discouraged, so while at it, please replace with

	if (err)

>  		return err;
> -	}
>  
>  	return 0;

...

> +++ b/drivers/gpio/gpio-brcmstb.c
> @@ -489,10 +489,8 @@ static int brcmstb_gpio_irq_setup(struct platform_device *pdev,
>  					       IRQF_SHARED,
>  					       "brcmstb-gpio-wake", priv);
>  
> -			if (err < 0) {
> -				dev_err(dev, "Couldn't request wake IRQ");
> +			if (err < 0)

This style might be okay, but has no sense, we know that there is no positive
out from this function, so, please also replace with

			if (err)

>  				goto out_free_domain;
> -			}
>  		}
>  		priv->irq_chip.irq_set_wake = brcmstb_gpio_irq_set_wake;
>  	}

...

> +++ b/drivers/gpio/gpio-max77620.c
> @@ -356,10 +356,8 @@ static int max77620_gpio_probe(struct platform_device *pdev)
>  	ret = devm_request_threaded_irq(&pdev->dev, gpio_irq, NULL,
>  					max77620_gpio_irqhandler, IRQF_ONESHOT,
>  					"max77620-gpio", mgpio);
> -	if (ret < 0) {
> -		dev_err(&pdev->dev, "failed to request IRQ: %d\n", ret);
> +	if (ret < 0)
>  		return ret;
> -	}

Ditto. And so on...

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2026-07-17 10:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17  8:30 [PATCH] gpio: Remove redundant dev_err()/dev_err_probe() Pan Chuang
2026-07-17 10:23 ` Andy Shevchenko [this message]

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=aloCpCgDYjps9yQu@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andre.draszik@linaro.org \
    --cc=andy@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=brgl@kernel.org \
    --cc=dlan@kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=geert+renesas@glider.be \
    --cc=hoan@os.amperecomputing.com \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=magnus.damm@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=opendmb@gmail.com \
    --cc=orsonzhai@gmail.com \
    --cc=panchuang@vivo.com \
    --cc=rjui@broadcom.com \
    --cc=robert.jarzmik@free.fr \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=sbranden@broadcom.com \
    --cc=spacemit@lists.linux.dev \
    --cc=tmyu0@nuvoton.com \
    --cc=zhang.lyra@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox