[PATCH RESEND v2 2/2] usb: udc: Try to clarify an error message

Massimo Pegorer massimo.pegorer+oss at gmail.com
Mon Oct 2 16:37:10 CEST 2023


Hi Miquel,

Il giorno lun 2 ott 2023 alle ore 15:46 Miquel Raynal
<miquel.raynal at bootlin.com> ha scritto:
>
> At some point when trying to use USB gadgets, two situations may arise

[...cut...]

> Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
> ---
> While doing this I really wanted to add "much more" error comments but I
> faced another reality: often the messages are there but use
> pr_err/log_err which is actually silenced by default with LOGLEVEL=3, so
> I consider this unnecessary, as decreasing the loglevel will make these
> messages appear. I would have expected errors to be displayed, but I
> understand it makes the binaries even bigger.

This is how it works for pr_err but not for log_err: if you are not
using CONFIG_LOG, all log_xxx with level less than or equal to INFO
are in the binary. On the other hand, if you have CONFIG_LOG=y,
log_xxx are left out based on LOG_MAX_LEVEL value, while pr_xxx are
left out based on both LOGLEVEL and LOG_MAX_LEVEL too (due to the fact
that pr_xxx relies on log_xxx). This is quite confusing IMO. I'm
working on a proposal for a simpler and clearer unified way to log in
U-Boot.

Regards,
Massimo

> Resend: no change.
>

[...cut...]


More information about the U-Boot mailing list