[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0948d94a-3a50-8cc4-7984-03a0fff0b7b1@gmail.com>
Date: Mon, 29 Nov 2021 08:13:39 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Alvin Šipraga <alvin@...s.dk>,
netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org,
Alvin Šipraga <alsi@...g-olufsen.dk>
Subject: Re: [PATCH net 1/3] net: dsa: realtek-smi: don't log an error on
EPROBE_DEFER
On 26.11.2021 13:50, 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 | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/realtek-smi-core.c b/drivers/net/dsa/realtek-smi-core.c
> index c66ebd0ee217..9415dd81ce5a 100644
> --- a/drivers/net/dsa/realtek-smi-core.c
> +++ b/drivers/net/dsa/realtek-smi-core.c
> @@ -456,7 +456,9 @@ 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);
> + if (ret != -EPROBE_DEFER)
Better use dev_err_probe().
> + dev_err(dev, "unable to register switch ret = %d\n",
> + ret);
> return ret;
> }
> return 0;
>
Powered by blists - more mailing lists