18 Mar
2024
18 Mar
'24
8:40 a.m.
Hi Mark,
On 3/15/24 15:40, Mark Brown wrote:
On Fri, Mar 15, 2024 at 03:23:32PM +0100, Herve Codina wrote:
Mark Brown broonie@kernel.org wrote:
dev_err_probe() with a fixed error code doesn't seem to make much sense, the whole point is to handle deferral but for a straight lookup like this that can't happen.
The error code is uniformly formatted and the error path is more compact. https://elixir.bootlin.com/linux/latest/source/drivers/base/core.c#L4963
IMHO, to benefit of these feature, it makes sense to use it even with a fixed error code.
I'm not convinced TBH, the fixed error code smells pretty bad.
Ok. I'll keep the dev_err() for the fixed errors then, and use the dev_err_probe() for the others, would that be ok ?
Best regards, Bastien