Re: [PATCH v9 9/9] liveupdate: kho: Use %pe format specifier for error pointer printing

From: Pratyush Yadav
Date: Mon Nov 03 2025 - 08:08:20 EST


On Sat, Nov 01 2025, Pasha Tatashin wrote:

> From: Zhu Yanjun <yanjun.zhu@xxxxxxxxx>
>
> Make pr_xxx() call to use the %pe format specifier instead of %d.
> The %pe specifier prints a symbolic error string (e.g., -ENOMEM,
> -EINVAL) when given an error pointer created with ERR_PTR(err).
>
> This change enhances the clarity and diagnostic value of the error
> message by showing a descriptive error name rather than a numeric
> error code.
>
> Note, that some err are still printed by value, as those errors
> might come from libfdt and not regular errnos.

There is fdt_strerror() that does this for libfdt errnos. Something to
do in a follow up patch I suppose.

>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxx>
> Co-developed-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
> Reviewed-by: Simon Horman <horms@xxxxxxxxxx>

Reviewed-by: Pratyush Yadav <pratyush@xxxxxxxxxx>

[...]

--
Regards,
Pratyush Yadav