lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <15522e0b-242e-5721-4761-be170c93e249@gmail.com>
Date:   Mon, 29 Nov 2021 17:57:36 +0100
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Alvin Šipraga <alvin@...s.dk>,
        netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, linus.walleij@...aro.org,
        andrew@...n.ch, f.fainelli@...il.com, olteanv@...il.com,
        vivien.didelot@...il.com,
        Alvin Šipraga <alsi@...g-olufsen.dk>
Subject: Re: [PATCH net v2 1/3] net: dsa: realtek-smi: don't log an error on
 EPROBE_DEFER

On 29.11.2021 11:30, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@...g-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@...g-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;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ