diff mbox series

[net,v2] net: dsa: felix: suppress -EPROBE_DEFER errors

Message ID 20220408101521.281886-1-michael@walle.cc (mailing list archive)
State Accepted
Commit e6934e4048c91502efcb21da92b7ae37cd8fa741
Delegated to: Netdev Maintainers
Headers show
Series [net,v2] net: dsa: felix: suppress -EPROBE_DEFER errors | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: line length of 82 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Michael Walle April 8, 2022, 10:15 a.m. UTC
The DSA master might not have been probed yet in which case the probe of
the felix switch fails with -EPROBE_DEFER:
[    4.435305] mscc_felix 0000:00:00.5: Failed to register DSA switch: -517

It is not an error. Use dev_err_probe() to demote this particular error
to a debug message.

Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family")
Signed-off-by: Michael Walle <michael@walle.cc>
---
changes since v1:
 - add Fixes tag and thus use net instead of net-next
 - just replace this particular dev_err() with dev_err_probed()
 - reword commit message

 drivers/net/dsa/ocelot/felix_vsc9959.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vladimir Oltean April 8, 2022, 12:46 p.m. UTC | #1
On Fri, Apr 08, 2022 at 12:15:21PM +0200, Michael Walle wrote:
> The DSA master might not have been probed yet in which case the probe of
> the felix switch fails with -EPROBE_DEFER:
> [    4.435305] mscc_felix 0000:00:00.5: Failed to register DSA switch: -517
> 
> It is not an error. Use dev_err_probe() to demote this particular error
> to a debug message.
> 
> Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family")
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
patchwork-bot+netdevbpf@kernel.org April 9, 2022, 3:40 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Fri,  8 Apr 2022 12:15:21 +0200 you wrote:
> The DSA master might not have been probed yet in which case the probe of
> the felix switch fails with -EPROBE_DEFER:
> [    4.435305] mscc_felix 0000:00:00.5: Failed to register DSA switch: -517
> 
> It is not an error. Use dev_err_probe() to demote this particular error
> to a debug message.
> 
> [...]

Here is the summary with links:
  - [net,v2] net: dsa: felix: suppress -EPROBE_DEFER errors
    https://git.kernel.org/netdev/net/c/e6934e4048c9

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index 8d382b27e625..52a8566071ed 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -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;
 	}