From: Jonathan Cameron <jic23@kernel.org>
To: Ruan Jinjie <ruanjinjie@huawei.com>
Cc: <linus.walleij@linaro.org>, <lars@metafoo.de>,
<haibo.chen@nxp.com>, <shawnguo@kernel.org>,
<s.hauer@pengutronix.de>, <kernel@pengutronix.de>,
<festevam@gmail.com>, <linux-imx@nxp.com>, <heiko@sntech.de>,
<ktsai@capellamicro.com>, <risca@dalakolonin.se>,
<christophe.jaillet@wanadoo.fr>, <dan.carpenter@linaro.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-iio@vger.kernel.org>, <linux-rockchip@lists.infradead.org>
Subject: Re: [PATCH -next] iio: adc: Remove redundant dev_err_probe()
Date: Sat, 29 Jul 2023 12:15:09 +0100 [thread overview]
Message-ID: <20230729121509.4cfe6566@jic23-huawei> (raw)
In-Reply-To: <20230727073912.4178659-1-ruanjinjie@huawei.com>
On Thu, 27 Jul 2023 15:39:12 +0800
Ruan Jinjie <ruanjinjie@huawei.com> wrote:
> There is no need to call the dev_err() function directly to print a custom
> message when handling an error from either the platform_get_irq() or
> platform_get_irq_byname() functions as both are going to display an
> appropriate error message in case of a failure.
>
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Applied to the togreg branch of iio.git. That is initially pushed out as
testing to let the autobuilders see if they can find any problems.
Thanks,
Jonathan
> ---
> drivers/iio/adc/ab8500-gpadc.c | 6 ++----
> drivers/iio/adc/imx7d_adc.c | 2 +-
> drivers/iio/adc/palmas_gpadc.c | 6 ++----
> drivers/iio/adc/rockchip_saradc.c | 2 +-
> drivers/iio/light/cm3605.c | 2 +-
> 5 files changed, 7 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/iio/adc/ab8500-gpadc.c b/drivers/iio/adc/ab8500-gpadc.c
> index 4fa2126a354b..3b1bdd0b531d 100644
> --- a/drivers/iio/adc/ab8500-gpadc.c
> +++ b/drivers/iio/adc/ab8500-gpadc.c
> @@ -1099,14 +1099,12 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
>
> gpadc->irq_sw = platform_get_irq_byname(pdev, "SW_CONV_END");
> if (gpadc->irq_sw < 0)
> - return dev_err_probe(dev, gpadc->irq_sw,
> - "failed to get platform sw_conv_end irq\n");
> + return gpadc->irq_sw;
>
> if (is_ab8500(gpadc->ab8500)) {
> gpadc->irq_hw = platform_get_irq_byname(pdev, "HW_CONV_END");
> if (gpadc->irq_hw < 0)
> - return dev_err_probe(dev, gpadc->irq_hw,
> - "failed to get platform hw_conv_end irq\n");
> + return gpadc->irq_hw;
> } else {
> gpadc->irq_hw = 0;
> }
> diff --git a/drivers/iio/adc/imx7d_adc.c b/drivers/iio/adc/imx7d_adc.c
> index 22da81bac97f..828d3fea6d43 100644
> --- a/drivers/iio/adc/imx7d_adc.c
> +++ b/drivers/iio/adc/imx7d_adc.c
> @@ -496,7 +496,7 @@ static int imx7d_adc_probe(struct platform_device *pdev)
>
> irq = platform_get_irq(pdev, 0);
> if (irq < 0)
> - return dev_err_probe(dev, irq, "Failed getting irq\n");
> + return irq;
>
> info->clk = devm_clk_get(dev, "adc");
> if (IS_ERR(info->clk))
> diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c
> index 27b2632c1037..a66da674a6ad 100644
> --- a/drivers/iio/adc/palmas_gpadc.c
> +++ b/drivers/iio/adc/palmas_gpadc.c
> @@ -916,8 +916,7 @@ static int palmas_gpadc_probe(struct platform_device *pdev)
>
> adc->irq_auto_0 = platform_get_irq(pdev, 1);
> if (adc->irq_auto_0 < 0)
> - return dev_err_probe(adc->dev, adc->irq_auto_0,
> - "get auto0 irq failed\n");
> + return adc->irq_auto_0;
>
> ret = devm_request_threaded_irq(&pdev->dev, adc->irq_auto_0, NULL,
> palmas_gpadc_irq_auto, IRQF_ONESHOT,
> @@ -929,8 +928,7 @@ static int palmas_gpadc_probe(struct platform_device *pdev)
>
> adc->irq_auto_1 = platform_get_irq(pdev, 2);
> if (adc->irq_auto_1 < 0)
> - return dev_err_probe(adc->dev, adc->irq_auto_1,
> - "get auto1 irq failed\n");
> + return adc->irq_auto_1;
>
> ret = devm_request_threaded_irq(&pdev->dev, adc->irq_auto_1, NULL,
> palmas_gpadc_irq_auto, IRQF_ONESHOT,
> diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c
> index 4b011f7eddec..8270652244c2 100644
> --- a/drivers/iio/adc/rockchip_saradc.c
> +++ b/drivers/iio/adc/rockchip_saradc.c
> @@ -467,7 +467,7 @@ static int rockchip_saradc_probe(struct platform_device *pdev)
>
> irq = platform_get_irq(pdev, 0);
> if (irq < 0)
> - return dev_err_probe(&pdev->dev, irq, "failed to get irq\n");
> + return irq;
>
> ret = devm_request_irq(&pdev->dev, irq, rockchip_saradc_isr,
> 0, dev_name(&pdev->dev), info);
> diff --git a/drivers/iio/light/cm3605.c b/drivers/iio/light/cm3605.c
> index 0b30db77f78b..e7f0b81b7f5a 100644
> --- a/drivers/iio/light/cm3605.c
> +++ b/drivers/iio/light/cm3605.c
> @@ -227,7 +227,7 @@ static int cm3605_probe(struct platform_device *pdev)
>
> irq = platform_get_irq(pdev, 0);
> if (irq < 0) {
> - ret = dev_err_probe(dev, irq, "failed to get irq\n");
> + ret = irq;
> goto out_disable_aset;
> }
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2023-07-29 11:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 7:39 [PATCH -next] iio: adc: Remove redundant dev_err_probe() Ruan Jinjie
2023-07-28 18:23 ` Heiko Stuebner
2023-07-28 20:00 ` Linus Walleij
2023-07-29 11:15 ` Jonathan Cameron [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=20230729121509.4cfe6566@jic23-huawei \
--to=jic23@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dan.carpenter@linaro.org \
--cc=festevam@gmail.com \
--cc=haibo.chen@nxp.com \
--cc=heiko@sntech.de \
--cc=kernel@pengutronix.de \
--cc=ktsai@capellamicro.com \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-rockchip@lists.infradead.org \
--cc=risca@dalakolonin.se \
--cc=ruanjinjie@huawei.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/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