Re: [PATCH v1] misc: genwqe: Simplify with dev_err_probe()

From: Krzysztof Kozlowski
Date: Fri Aug 30 2024 - 14:15:35 EST


On 30/08/2024 10:38, Shen Lichuan wrote:
> Use dev_err_probe() to simplify the error path and unify a message
> template.
>
> Using this helper is totally fine even if err is known to never
> be -EPROBE_DEFER.
>
> The benefit compared to a normal dev_err() is the standardized format
> of the error code, it being emitted symbolically and the fact that
> the error code is returned which allows more compact error paths.
>
> Signed-off-by: Shen Lichuan <shenlichuan@xxxxxxxx>
> ---
> drivers/misc/genwqe/card_base.c | 21 +++++++++------------
> 1 file changed, 9 insertions(+), 12 deletions(-)
>

Since ~2 weeks there is tremendous amount of trivial patches coming from
vivo.com. I identified at least 6 buggy, where the contributor did not
understand the code. Not sure about intention, but I advise extra
carefulness when dealing with these "trivial" improvements (because we
tend to apply things which look trivial).


Best regards,
Krzysztof