On Thu, Jul 06, 2023 at 09:25:26AM +0200, Amadeusz Sławiński wrote:
On 7/6/2023 8:14 AM, Johan Hovold wrote:
In short, it is not correct to use dev_err_probe() here as this is not a probe function.
dev_err_probe() is tied to driver core and will specifically allocate and associate an error message with the struct device on probe deferrals, which is later freed when the struct device is bound to a driver (or released).
I guess you mean call to: device_set_deferred_probe_reason(dev, &vaf); perhaps functionality could be extended to allow to skip this call and just do prints? Or just add separate dev_err_defer function without this step, although it would be best if they could share parts of code.
Feel free to suggest adding such a function if you think it's worthwhile. It doesn't exist today it should not be a prerequisite for suppressing these error messages.
Johan