[PATCH] firmware: arm_scmi: Use dev_err_probe() simplify the code

Cristian Marussi cristian.marussi at arm.com
Thu May 15 06:59:24 PDT 2025


On Thu, May 15, 2025 at 08:38:55PM +0800, long.yunjian at zte.com.cn wrote:
> From: Yumeng Fang <fang.yumeng at zte.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.

Thanks,
Cristian



More information about the linux-arm-kernel mailing list