From: Michael Walle <michael@walle.cc>
To: Vladimir Oltean <vladimir.oltean@nxp.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: UNGLinuxDriver@microchip.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Michael Walle <michael@walle.cc>
Subject: [PATCH net-next] net: dsa: felix: suppress -EPROBE_DEFER errors
Date: Thu, 7 Apr 2022 15:06:25 +0200 [thread overview]
Message-ID: <20220407130625.190078-1-michael@walle.cc> (raw)
Due to missing prerequisites the probe of the felix switch might be
deferred:
[ 4.435305] mscc_felix 0000:00:00.5: Failed to register DSA switch: -517
It's not an error. Use dev_err_probe() to demote the error to a debug
message. While at it, replace all the dev_err()'s in the probe with
dev_err_probe().
Signed-off-by: Michael Walle <michael@walle.cc>
---
Should this be a patch with a Fixes tag?
drivers/net/dsa/ocelot/felix_vsc9959.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index 8d382b27e625..1f8c4c6de01b 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -2268,14 +2268,14 @@ static int felix_pci_probe(struct pci_dev *pdev,
err = pci_enable_device(pdev);
if (err) {
- dev_err(&pdev->dev, "device enable failed\n");
+ dev_err_probe(&pdev->dev, err, "device enable failed\n");
goto err_pci_enable;
}
felix = kzalloc(sizeof(struct felix), GFP_KERNEL);
if (!felix) {
err = -ENOMEM;
- dev_err(&pdev->dev, "Failed to allocate driver memory\n");
+ dev_err_probe(&pdev->dev, err, "Failed to allocate driver memory\n");
goto err_alloc_felix;
}
@@ -2293,7 +2293,7 @@ static int felix_pci_probe(struct pci_dev *pdev,
&felix_irq_handler, IRQF_ONESHOT,
"felix-intb", ocelot);
if (err) {
- dev_err(&pdev->dev, "Failed to request irq\n");
+ dev_err_probe(&pdev->dev, err, "Failed to request irq\n");
goto err_alloc_irq;
}
@@ -2316,7 +2316,7 @@ static int felix_pci_probe(struct pci_dev *pdev,
err = dsa_register_switch(ds);
if (err) {
- dev_err(&pdev->dev, "Failed to register DSA switch: %d\n", err);
+ dev_err_probe(&pdev->dev, err, "Failed to register DSA switch\n");
goto err_register_ds;
}
--
2.30.2
next reply other threads:[~2022-04-07 13:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 13:06 Michael Walle [this message]
2022-04-07 13:56 ` [PATCH net-next] net: dsa: felix: suppress -EPROBE_DEFER errors Vladimir Oltean
2022-04-07 14:04 ` Michael Walle
2022-04-07 14:12 ` Vladimir Oltean
2022-04-07 14:25 ` Michael Walle
2022-04-07 14:58 ` Michael Walle
2022-04-08 2:56 ` 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=20220407130625.190078-1-michael@walle.cc \
--to=michael@walle.cc \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@nxp.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: 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).