diff mbox series

[net,v2,1/3] net: dsa: realtek-smi: don't log an error on EPROBE_DEFER

Message ID 20211129103019.1997018-1-alvin@pqrs.dk (mailing list archive)
State Accepted
Commit b014861d96a69f7fd101406f3ebd61e2a76f5dbe
Delegated to: Netdev Maintainers
Headers show
Series [net,v2,1/3] net: dsa: realtek-smi: don't log an error on EPROBE_DEFER | 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 warning Series does not have a cover letter
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 8 of 8 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 No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Alvin Šipraga Nov. 29, 2021, 10:30 a.m. UTC
From: Alvin Šipraga <alsi@bang-olufsen.dk>

Probe deferral is not an error, so don't log this as an error:

[0.590156] realtek-smi ethernet-switch: unable to register switch ret = -517

Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
---
 drivers/net/dsa/realtek-smi-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

v2: use dev_err_probe() instead of manually checking ret

Comments

Andrew Lunn Nov. 29, 2021, 12:55 p.m. UTC | #1
On Mon, Nov 29, 2021 at 11:30:17AM +0100, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> Probe deferral is not an error, so don't log this as an error:
> 
> [0.590156] realtek-smi ethernet-switch: unable to register switch ret = -517
> 
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
patchwork-bot+netdevbpf@kernel.org Nov. 29, 2021, 1 p.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 29 Nov 2021 11:30:17 +0100 you wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> Probe deferral is not an error, so don't log this as an error:
> 
> [0.590156] realtek-smi ethernet-switch: unable to register switch ret = -517
> 
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> [...]

Here is the summary with links:
  - [net,v2,1/3] net: dsa: realtek-smi: don't log an error on EPROBE_DEFER
    https://git.kernel.org/netdev/net-next/c/b014861d96a6
  - [net,v2,2/3] net: dsa: rtl8365mb: fix garbled comment
    https://git.kernel.org/netdev/net-next/c/1ecab9370eef
  - [net,v2,3/3] net: dsa: rtl8365mb: set RGMII RX delay in steps of 0.3 ns
    https://git.kernel.org/netdev/net-next/c/ef136837aaf6

You are awesome, thank you!
Heiner Kallweit Nov. 29, 2021, 4:57 p.m. UTC | #3
On 29.11.2021 11:30, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> Probe deferral is not an error, so don't log this as an error:
> 
> [0.590156] realtek-smi ethernet-switch: unable to register switch ret = -517
> 
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
> ---
>  drivers/net/dsa/realtek-smi-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> v2: use dev_err_probe() instead of manually checking ret
> 
> diff --git a/drivers/net/dsa/realtek-smi-core.c b/drivers/net/dsa/realtek-smi-core.c
> index c66ebd0ee217..aae46ada8d83 100644
> --- a/drivers/net/dsa/realtek-smi-core.c
> +++ b/drivers/net/dsa/realtek-smi-core.c
> @@ -456,7 +456,7 @@ static int realtek_smi_probe(struct platform_device *pdev)
>  	smi->ds->ops = var->ds_ops;
>  	ret = dsa_register_switch(smi->ds);
>  	if (ret) {
> -		dev_err(dev, "unable to register switch ret = %d\n", ret);
> +		dev_err_probe(dev, ret, "unable to register switch\n");
>  		return ret;

Nit, following would have been simpler:

if (ret)
	return dev_err_probe(dev, ret, "unable to register switch\n");

>  	}
>  	return 0;
>
Alvin Šipraga Dec. 2, 2021, 4:25 p.m. UTC | #4
Hi David and Jakub,

I just noticed these patches aren't in the networking pull request for 
5.16-rc4. Indeed, patchwork bot says that they were applied to net-next 
(didn't notice before). Is it now too late for them to land in 5.16?

It is not a big deal, but the interpretation of device tree-specified 
RGMII RX delay is different after this series, hence why I wanted to get 
it in before the driver makes its way into a release.

Maybe I did something wrong? I am pretty new to netdev. :-)

Thanks!

	Alvin

On 11/29/21 14:00, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
> 
> This series was applied to netdev/net-next.git (master)
> by David S. Miller <davem@davemloft.net>:
> 
> On Mon, 29 Nov 2021 11:30:17 +0100 you wrote:
>> From: Alvin Šipraga <alsi@bang-olufsen.dk>
>>
>> Probe deferral is not an error, so don't log this as an error:
>>
>> [0.590156] realtek-smi ethernet-switch: unable to register switch ret = -517
>>
>> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
>>
>> [...]
> 
> Here is the summary with links:
>    - [net,v2,1/3] net: dsa: realtek-smi: don't log an error on EPROBE_DEFER
>      https://git.kernel.org/netdev/net-next/c/b014861d96a6>>    - [net,v2,2/3] net: dsa: rtl8365mb: fix garbled comment
>      https://git.kernel.org/netdev/net-next/c/1ecab9370eef>>    - [net,v2,3/3] net: dsa: rtl8365mb: set RGMII RX delay in steps of 0.3 ns
>      https://git.kernel.org/netdev/net-next/c/ef136837aaf6>> 
> You are awesome, thank you!
>
diff mbox series

Patch

diff --git a/drivers/net/dsa/realtek-smi-core.c b/drivers/net/dsa/realtek-smi-core.c
index c66ebd0ee217..aae46ada8d83 100644
--- a/drivers/net/dsa/realtek-smi-core.c
+++ b/drivers/net/dsa/realtek-smi-core.c
@@ -456,7 +456,7 @@  static int realtek_smi_probe(struct platform_device *pdev)
 	smi->ds->ops = var->ds_ops;
 	ret = dsa_register_switch(smi->ds);
 	if (ret) {
-		dev_err(dev, "unable to register switch ret = %d\n", ret);
+		dev_err_probe(dev, ret, "unable to register switch\n");
 		return ret;
 	}
 	return 0;