Re: [PATCH] net: alacritech: Partially revert "net: alacritech: Switch to use dev_err_probe()"

From: Simon Horman
Date: Fri Aug 30 2024 - 14:28:57 EST


On Fri, Aug 30, 2024 at 07:00:14PM +0200, Krzysztof Kozlowski wrote:
> This reverts commit bf4d87f884fe8a4b6b61fe4d0e05f293d08df61c because it
> introduced dev_err_probe() in non-probe path, which is not desired.
> Calling it after successful probe, dev_err_probe() will set deferred
> status on the device already probed. See also documentation of
> dev_err_probe().

I agree that using dev_err_probe() outside of a probe path is
inappropriate. And I agree that your patch addresses that problem
in the context of changes made by the cited commit.

But, based on my reading of dev_err_probe(), I think the text above is
slightly misleading. This is because deferred status is only set in the
case where the err passed to dev_err_probe() is -EPROBE_DEFER. And I do
suspect that is never the case for the calls removed by this patch.

> Fixes: bf4d87f884fe ("net: alacritech: Switch to use dev_err_probe()")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>

...