[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <426139eb-46a7-0c3d-dd2f-9dc5fc044a54@bang-olufsen.dk>
Date: Mon, 29 Nov 2021 09:16:18 +0000
From: Alvin Šipraga <ALSI@...g-olufsen.dk>
To: Heiner Kallweit <hkallweit1@...il.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
Alvin Šipraga <alvin@...s.dk>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net 1/3] net: dsa: realtek-smi: don't log an error on
EPROBE_DEFER
On 11/29/21 08:13, Heiner Kallweit wrote:
> 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().
Didn't know about that - thanks. I'll send a v2.
>
>> + dev_err(dev, "unable to register switch ret = %d\n",
>> + ret);
>> return ret;
>> }
>> return 0;
>>
>
Powered by blists - more mailing lists