Re: [PATCH v3 5/5] spi: rockchip: Use dev_{err,warn}_probe() in the probe path
From: Hélène Vulquin
Date: Tue Oct 01 2024 - 05:07:01 EST
On Sun Sep 29, 2024 at 11:21 AM CEST, Dragan Simic wrote:
> Use function dev_err_probe() in the probe path instead of dev_err() where
> appropriate, to make the code a bit more uniform and compact. Use the new
> function dev_warn_probe() to improve error handling for the TX and RX DMA
> channel requests, which are actually optional, and tweak the logged warnings
> a bit to additionally describe their optional nature.
>
> Previously, deferred requests for the TX and RX DMA channels produced no
> debug messages, and the final error messages didn't include the error codes,
> which are all highly useful when debugging permanently failed DMA channel
> requests, such as when the required drivers aren't enabled.
>
> Suggested-by: Hélene Vulquin <oss@xxxxxxxxxx>
> Signed-off-by: Dragan Simic <dsimic@xxxxxxxxxxx>
I can now see appropriate messages for pending probes on Rockchip SPI
devices, instead of "(reason unknown)", which is incredibly helpful
for debugging DeviceTrees and kernel configs.
Tested on 6.11 and looks like it works as intended.
Thank you for this patch!
Tested-by: Hélène Vulquin <oss@xxxxxxxxxx>