[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220407130625.190078-1-michael@walle.cc>
Date: Thu, 7 Apr 2022 15:06:25 +0200
From: Michael Walle <michael@...le.cc>
To: Vladimir Oltean <vladimir.oltean@....com>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Michael Walle <michael@...le.cc>
Subject: [PATCH net-next] net: dsa: felix: suppress -EPROBE_DEFER errors
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@...le.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
Powered by blists - more mailing lists