[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18ff08db-9d0a-40bb-b84d-785d25e2b8fc@wanadoo.fr>
Date: Fri, 16 May 2025 17:23:37 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Cristian Marussi <cristian.marussi@....com>, long.yunjian@....com.cn
Cc: sudeep.holla@....com, peng.fan@....com, justin.chen@...adcom.com,
florian.fainelli@...adcom.com, arm-scmi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
fang.yumeng@....com.cn, mou.yi@....com.cn, ouyang.maochun@....com.cn,
xu.lifeng1@....com.cn
Subject: Re: [PATCH] firmware: arm_scmi: Use dev_err_probe() simplify the code
Le 15/05/2025 à 15:59, Cristian Marussi a écrit :
> On Thu, May 15, 2025 at 08:38:55PM +0800, long.yunjian@....com.cn wrote:
>> From: Yumeng Fang <fang.yumeng@....com.cn>
>>
>
> Hi,
>
>> In the probe path, dev_err() can be replaced with dev_err_probe()
>> which will check if error code is -EPROBE_DEFER and prints the
>> error name. It also sets the defer probe reason which can be
>> checked later through debugfs.
>
> All true...but...if you look at the main scmi_probe() function all of these
> failures are trapped at that level currently on the return path...
>
> see the call chain from
>
> scmi_probe()
> ....
> ret = scmi_channels_setup(info);
> ...
>
> ...so your probe errors will be overridden there with a more generic message
> left in debugfs at the top level.
This is only true only when -EPROBE_DEFER is returned.
In other cases, I think that we would get 2 messages. The specific one
from scmi_channels_setup() and a generic one from scmi_probe().
in such a case, the one in scmi_channels_setup() will be better, because
it will log the error code in a human readable format, which is not the
case now.
So, I think that the patch:
- simplify the code
- improve the error messages in some cases
If -EPROBE_DEFER is returned, I think that the additional call would
just but a harmless no-op.
CJ
>
> Thanks,
> Cristian
>
>
Powered by blists - more mailing lists