From: Chen Jiahao <chenjiahao16@huawei.com> To: <andersson@kernel.org>, <mathieu.poirier@linaro.org>, <mcoquelin.stm32@gmail.com>, <alexandre.torgue@foss.st.com>, <linux-remoteproc@vger.kernel.org>, <linux-stm32@st-md-mailman.stormreply.com>, <linux-arm-kernel@lists.infradead.org>, <arnaud.pouliquen@foss.st.com> Cc: <chenjiahao16@huawei.com> Subject: [PATCH -next v2] remoteproc: stm32: Clean up redundant dev_err_probe() Date: Thu, 17 Aug 2023 16:33:36 +0800 [thread overview] Message-ID: <20230817083336.404635-1-chenjiahao16@huawei.com> (raw) Referring to platform_get_irq()'s definition, the return value has already been checked if ret < 0, and printed via dev_err_probe(). Calling dev_err_probe() one more time outside platform_get_irq() is obviously redundant. Removing outside dev_err_probe() to clean it up. Besides, switch to use platform_get_irq_optional() since the irq is optional here. Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com> --- drivers/remoteproc/stm32_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index 98234b44f038..1f53c672c66b 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -712,9 +712,9 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev, unsigned int tzen; int err, irq; - irq = platform_get_irq(pdev, 0); + irq = platform_get_irq_optional(pdev, 0); if (irq == -EPROBE_DEFER) - return dev_err_probe(dev, irq, "failed to get interrupt\n"); + return irq; if (irq > 0) { err = devm_request_irq(dev, irq, stm32_rproc_wdg, 0, -- 2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: Chen Jiahao <chenjiahao16@huawei.com> To: <andersson@kernel.org>, <mathieu.poirier@linaro.org>, <mcoquelin.stm32@gmail.com>, <alexandre.torgue@foss.st.com>, <linux-remoteproc@vger.kernel.org>, <linux-stm32@st-md-mailman.stormreply.com>, <linux-arm-kernel@lists.infradead.org>, <arnaud.pouliquen@foss.st.com> Cc: <chenjiahao16@huawei.com> Subject: [PATCH -next v2] remoteproc: stm32: Clean up redundant dev_err_probe() Date: Thu, 17 Aug 2023 16:33:36 +0800 [thread overview] Message-ID: <20230817083336.404635-1-chenjiahao16@huawei.com> (raw) Referring to platform_get_irq()'s definition, the return value has already been checked if ret < 0, and printed via dev_err_probe(). Calling dev_err_probe() one more time outside platform_get_irq() is obviously redundant. Removing outside dev_err_probe() to clean it up. Besides, switch to use platform_get_irq_optional() since the irq is optional here. Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com> --- drivers/remoteproc/stm32_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index 98234b44f038..1f53c672c66b 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -712,9 +712,9 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev, unsigned int tzen; int err, irq; - irq = platform_get_irq(pdev, 0); + irq = platform_get_irq_optional(pdev, 0); if (irq == -EPROBE_DEFER) - return dev_err_probe(dev, irq, "failed to get interrupt\n"); + return irq; if (irq > 0) { err = devm_request_irq(dev, irq, stm32_rproc_wdg, 0, -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2023-08-17 8:34 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-17 8:33 Chen Jiahao [this message] 2023-08-17 8:33 ` [PATCH -next v2] remoteproc: stm32: Clean up redundant dev_err_probe() Chen Jiahao 2023-08-30 12:36 ` [Linux-stm32] " Arnaud POULIQUEN 2023-08-30 12:36 ` Arnaud POULIQUEN 2023-09-13 16:24 ` Mathieu Poirier 2023-09-13 16:24 ` Mathieu Poirier
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=20230817083336.404635-1-chenjiahao16@huawei.com \ --to=chenjiahao16@huawei.com \ --cc=alexandre.torgue@foss.st.com \ --cc=andersson@kernel.org \ --cc=arnaud.pouliquen@foss.st.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-remoteproc@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=mathieu.poirier@linaro.org \ --cc=mcoquelin.stm32@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.