netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anson Huang <Anson.Huang@nxp.com>
To: fugang.duan@nxp.com, davem@davemloft.net,
	gregkh@linuxfoundation.org, andy.shevchenko@gmail.com,
	rafael.j.wysocki@intel.com, swboyd@chromium.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Linux-imx@nxp.com
Subject: [PATCH 1/2] net: fec_main: Use platform_get_irq_byname_optional() to avoid error message
Date: Wed,  9 Oct 2019 18:15:47 +0800	[thread overview]
Message-ID: <1570616148-11571-1-git-send-email-Anson.Huang@nxp.com> (raw)

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

Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 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


             reply	other threads:[~2019-10-09 10:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 10:15 Anson Huang [this message]
2019-10-09 10:15 ` [PATCH 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message Anson Huang
2019-10-10  6:55   ` Andy Duan
2019-10-10 18:30   ` Stephen Boyd
2019-10-10  6:55 ` [PATCH 1/2] net: fec_main: Use platform_get_irq_byname_optional() " Andy Duan
2019-10-10 18:30 ` Stephen Boyd
2019-10-10 23:08 ` Jakub Kicinski
2019-10-11  0:03   ` Anson Huang
2019-10-11  0:32     ` Jakub Kicinski
2019-10-11  0:38       ` Anson Huang
2019-10-11  0:53         ` Jakub Kicinski
2019-10-11  1:10           ` Anson Huang
2019-10-11  9:55             ` Vladimir Oltean
2019-10-12  1:09               ` Anson Huang
2019-10-13  1:03               ` Jakub Kicinski

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=1570616148-11571-1-git-send-email-Anson.Huang@nxp.com \
    --to=anson.huang@nxp.com \
    --cc=Linux-imx@nxp.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fugang.duan@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=swboyd@chromium.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;
as well as URLs for NNTP newsgroup(s).