* [PATCH RESEND 1/2] net: fec_main: Use platform_get_irq_byname_optional() to avoid error message
@ 2019-10-29 1:53 Anson Huang
2019-10-29 1:53 ` [PATCH RESEND 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() " Anson Huang
2019-10-30 0:57 ` [PATCH RESEND 1/2] net: fec_main: Use platform_get_irq_byname_optional() " David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Anson Huang @ 2019-10-29 1:53 UTC (permalink / raw)
To: fugang.duan, davem, netdev, linux-kernel; +Cc: Linux-imx
Failed to get irq using name is NOT fatal as driver will use index
to get irq instead, use platform_get_irq_byname_optional() instead
of platform_get_irq_byname() to avoid below error message during
probe:
[ 0.819312] fec 30be0000.ethernet: IRQ int0 not found
[ 0.824433] fec 30be0000.ethernet: IRQ int1 not found
[ 0.829539] fec 30be0000.ethernet: IRQ int2 not found
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
- The patch f1da567f1dc1 ("driver core: platform: Add platform_get_irq_byname_optional()")
already landed on network/master, resend this patch set.
---
drivers/net/ethernet/freescale/fec_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index d4d4c72..22c01b2 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3558,7 +3558,7 @@ fec_probe(struct platform_device *pdev)
for (i = 0; i < irq_cnt; i++) {
snprintf(irq_name, sizeof(irq_name), "int%d", i);
- irq = platform_get_irq_byname(pdev, irq_name);
+ irq = platform_get_irq_byname_optional(pdev, irq_name);
if (irq < 0)
irq = platform_get_irq(pdev, i);
if (irq < 0) {
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RESEND 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message
2019-10-29 1:53 [PATCH RESEND 1/2] net: fec_main: Use platform_get_irq_byname_optional() to avoid error message Anson Huang
@ 2019-10-29 1:53 ` Anson Huang
2019-10-30 0:57 ` David Miller
2019-10-30 0:57 ` [PATCH RESEND 1/2] net: fec_main: Use platform_get_irq_byname_optional() " David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Anson Huang @ 2019-10-29 1:53 UTC (permalink / raw)
To: fugang.duan, davem, netdev, linux-kernel; +Cc: Linux-imx
Use platform_get_irq_byname_optional() and platform_get_irq_optional()
instead of platform_get_irq_byname() and platform_get_irq() for optional
IRQs to avoid below error message during probe:
[ 0.795803] fec 30be0000.ethernet: IRQ pps not found
[ 0.800787] fec 30be0000.ethernet: IRQ index 3 not found
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
- The patch f1da567f1dc1 ("driver core: platform: Add platform_get_irq_byname_optional()")
already landed on network/master, resend this patch set.
---
drivers/net/ethernet/freescale/fec_ptp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index 19e2365..945643c 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -600,9 +600,9 @@ void fec_ptp_init(struct platform_device *pdev, int irq_idx)
INIT_DELAYED_WORK(&fep->time_keep, fec_time_keep);
- irq = platform_get_irq_byname(pdev, "pps");
+ irq = platform_get_irq_byname_optional(pdev, "pps");
if (irq < 0)
- irq = platform_get_irq(pdev, irq_idx);
+ irq = platform_get_irq_optional(pdev, irq_idx);
/* Failure to get an irq is not fatal,
* only the PTP_CLOCK_PPS clock events should stop
*/
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND 1/2] net: fec_main: Use platform_get_irq_byname_optional() to avoid error message
2019-10-29 1:53 [PATCH RESEND 1/2] net: fec_main: Use platform_get_irq_byname_optional() to avoid error message Anson Huang
2019-10-29 1:53 ` [PATCH RESEND 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() " Anson Huang
@ 2019-10-30 0:57 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2019-10-30 0:57 UTC (permalink / raw)
To: Anson.Huang; +Cc: fugang.duan, netdev, linux-kernel, Linux-imx
From: Anson Huang <Anson.Huang@nxp.com>
Date: Tue, 29 Oct 2019 09:53:18 +0800
> Failed to get irq using name is NOT fatal as driver will use index
> to get irq instead, use platform_get_irq_byname_optional() instead
> of platform_get_irq_byname() to avoid below error message during
> probe:
>
> [ 0.819312] fec 30be0000.ethernet: IRQ int0 not found
> [ 0.824433] fec 30be0000.ethernet: IRQ int1 not found
> [ 0.829539] fec 30be0000.ethernet: IRQ int2 not found
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> Acked-by: Fugang Duan <fugang.duan@nxp.com>
> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message
2019-10-29 1:53 ` [PATCH RESEND 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() " Anson Huang
@ 2019-10-30 0:57 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-10-30 0:57 UTC (permalink / raw)
To: Anson.Huang; +Cc: fugang.duan, netdev, linux-kernel, Linux-imx
From: Anson Huang <Anson.Huang@nxp.com>
Date: Tue, 29 Oct 2019 09:53:19 +0800
> Use platform_get_irq_byname_optional() and platform_get_irq_optional()
> instead of platform_get_irq_byname() and platform_get_irq() for optional
> IRQs to avoid below error message during probe:
>
> [ 0.795803] fec 30be0000.ethernet: IRQ pps not found
> [ 0.800787] fec 30be0000.ethernet: IRQ index 3 not found
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> Acked-by: Fugang Duan <fugang.duan@nxp.com>
> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-30 0:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 1:53 [PATCH RESEND 1/2] net: fec_main: Use platform_get_irq_byname_optional() to avoid error message Anson Huang
2019-10-29 1:53 ` [PATCH RESEND 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() " Anson Huang
2019-10-30 0:57 ` David Miller
2019-10-30 0:57 ` [PATCH RESEND 1/2] net: fec_main: Use platform_get_irq_byname_optional() " David Miller
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).