diff mbox series

sh_eth: Use dev_err_probe() helper

Message ID 2576cc15bdbb5be636640f491bcc087a334e2c02.1638959463.git.geert+renesas@glider.be (mailing list archive)
State Accepted
Commit e5d75fc20b9278d07731f69e327adf16227813a6
Delegated to: Netdev Maintainers
Headers show
Series sh_eth: Use dev_err_probe() helper | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
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: 38 this patch: 38
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 260 this patch: 260
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: 38 this patch: 38
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Geert Uytterhoeven Dec. 8, 2021, 10:32 a.m. UTC
Use the dev_err_probe() helper, instead of open-coding the same
operation.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/net/ethernet/renesas/sh_eth.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Niklas Söderlund Dec. 8, 2021, 12:20 p.m. UTC | #1
Hi Geert,

Thanks for your work, I learnt something new.

On 2021-12-08 11:32:07 +0100, Geert Uytterhoeven wrote:

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> Use the dev_err_probe() helper, instead of open-coding the same
> operation.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/net/ethernet/renesas/sh_eth.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> index 223626290ce0e278..d947a628e1663009 100644
> --- a/drivers/net/ethernet/renesas/sh_eth.c
> +++ b/drivers/net/ethernet/renesas/sh_eth.c
> @@ -3368,8 +3368,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
>  	/* MDIO bus init */
>  	ret = sh_mdio_init(mdp, pd);
>  	if (ret) {
> -		if (ret != -EPROBE_DEFER)
> -			dev_err(&pdev->dev, "MDIO init failed: %d\n", ret);
> +		dev_err_probe(&pdev->dev, ret, "MDIO init failed\n");
>  		goto out_release;
>  	}
>  
> -- 
> 2.25.1
>
Sergey Shtylyov Dec. 8, 2021, 4:56 p.m. UTC | #2
Hello!

On 12/8/21 1:32 PM, Geert Uytterhoeven wrote:

> Use the dev_err_probe() helper, instead of open-coding the same
> operation.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey
patchwork-bot+netdevbpf@kernel.org Dec. 10, 2021, 3:20 a.m. UTC | #3
Hello:

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

On Wed,  8 Dec 2021 11:32:07 +0100 you wrote:
> Use the dev_err_probe() helper, instead of open-coding the same
> operation.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/net/ethernet/renesas/sh_eth.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
  - sh_eth: Use dev_err_probe() helper
    https://git.kernel.org/netdev/net-next/c/e5d75fc20b92

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 223626290ce0e278..d947a628e1663009 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -3368,8 +3368,7 @@  static int sh_eth_drv_probe(struct platform_device *pdev)
 	/* MDIO bus init */
 	ret = sh_mdio_init(mdp, pd);
 	if (ret) {
-		if (ret != -EPROBE_DEFER)
-			dev_err(&pdev->dev, "MDIO init failed: %d\n", ret);
+		dev_err_probe(&pdev->dev, ret, "MDIO init failed\n");
 		goto out_release;
 	}