* [PATCH net-next v2] net: ipa: Remove redundant dev_err()
@ 2022-12-12 7:18 Kang Minchul
2022-12-12 13:36 ` Alex Elder
0 siblings, 1 reply; 3+ messages in thread
From: Kang Minchul @ 2022-12-12 7:18 UTC (permalink / raw)
To: Alex Elder, David S . Miller, Jakub Kicinski
Cc: netdev, linux-kernel, Kang Minchul
Function dev_err() is redundant because platform_get_irq_byname()
already prints an error.
Also, platform_get_irq_byname() can't return 0 so ret <= 0
should be ret < 0.
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
---
Changes in v2:
- Annotate patch with net-next.
- Remove unnecessary comparison with zero.
drivers/net/ipa/gsi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index 55226b264e3c..a4f19f7f188e 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -1967,11 +1967,8 @@ int gsi_init(struct gsi *gsi, struct platform_device *pdev, bool prefetch,
/* Get the GSI IRQ and request for it to wake the system */
ret = platform_get_irq_byname(pdev, "gsi");
- if (ret <= 0) {
- dev_err(gsi->dev,
- "DT error %d getting \"gsi\" IRQ property\n", ret);
+ if (ret < 0)
return ret ? : -EINVAL;
- }
irq = ret;
ret = request_irq(irq, gsi_isr, 0, "gsi", gsi);
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] net: ipa: Remove redundant dev_err()
2022-12-12 7:18 [PATCH net-next v2] net: ipa: Remove redundant dev_err() Kang Minchul
@ 2022-12-12 13:36 ` Alex Elder
2022-12-16 19:59 ` Kang Minchul
0 siblings, 1 reply; 3+ messages in thread
From: Alex Elder @ 2022-12-12 13:36 UTC (permalink / raw)
To: Kang Minchul, Alex Elder, David S . Miller, Jakub Kicinski
Cc: netdev, linux-kernel
On 12/12/22 1:18 AM, Kang Minchul wrote:
> Function dev_err() is redundant because platform_get_irq_byname()
> already prints an error.
>
> Also, platform_get_irq_byname() can't return 0 so ret <= 0
> should be ret < 0.
>
> Signed-off-by: Kang Minchul <tegongkang@gmail.com>
Now that I've looked at this closely, it's not clear what
version of the code you are basing your patch on.
The current version of net-next/master, as well as the
current linus/master, do not include the message you
are removing. This patch removed the message more than
a year ago:
91306d1d131ee net: ipa: Remove useless error message
So at least the portion of your patch that removes the
message is unnecessary.
Meanwhile, it seems there is no need to check for a 0
return from platform_get_irq_byname(), but there is
no harm in doing so.
If you would like to send version 3 of this patch, which
would return what platform_get_irq_byname() returns if it
is less than 0 in gsi_irq_init(), I would be OK with that.
But please it on net-next/master.
Thanks.
-Alex
> ---
> Changes in v2:
> - Annotate patch with net-next.
> - Remove unnecessary comparison with zero.
>
> drivers/net/ipa/gsi.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
> index 55226b264e3c..a4f19f7f188e 100644
> --- a/drivers/net/ipa/gsi.c
> +++ b/drivers/net/ipa/gsi.c
> @@ -1967,11 +1967,8 @@ int gsi_init(struct gsi *gsi, struct platform_device *pdev, bool prefetch,
>
> /* Get the GSI IRQ and request for it to wake the system */
> ret = platform_get_irq_byname(pdev, "gsi");
> - if (ret <= 0) {
> - dev_err(gsi->dev,
> - "DT error %d getting \"gsi\" IRQ property\n", ret);
> + if (ret < 0)
> return ret ? : -EINVAL;
> - }
> irq = ret;
>
> ret = request_irq(irq, gsi_isr, 0, "gsi", gsi);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] net: ipa: Remove redundant dev_err()
2022-12-12 13:36 ` Alex Elder
@ 2022-12-16 19:59 ` Kang Minchul
0 siblings, 0 replies; 3+ messages in thread
From: Kang Minchul @ 2022-12-16 19:59 UTC (permalink / raw)
To: Alex Elder
Cc: Alex Elder, David S . Miller, Jakub Kicinski, netdev, linux-kernel
Thank you for your precious feedback.
> The current version of net-next/master, as well as the
> current linus/master, do not include the message you
> are removing. This patch removed the message more than
> a year ago:
>
> 91306d1d131ee net: ipa: Remove useless error message
>
> So at least the portion of your patch that removes the
> message is unnecessary.
Yes, I think I mistakenly worked on the wrong branch..
> Meanwhile, it seems there is no need to check for a 0
> return from platform_get_irq_byname(), but there is
> no harm in doing so.
>
> If you would like to send version 3 of this patch, which
> would return what platform_get_irq_byname() returns if it
> is less than 0 in gsi_irq_init(), I would be OK with that.
>
> But please it on net-next/master.
Ok, I'll send v3 of this patch soon.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-16 19:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12 7:18 [PATCH net-next v2] net: ipa: Remove redundant dev_err() Kang Minchul
2022-12-12 13:36 ` Alex Elder
2022-12-16 19:59 ` Kang Minchul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®