Hi Massimo, massimo.pegorer+...@gmail.com wrote on Mon, 2 Oct 2023 16:37:10 +0200:
> Hi Miquel, > > Il giorno lun 2 ott 2023 alle ore 15:46 Miquel Raynal > <miquel.ray...@bootlin.com> ha scritto: > > > > At some point when trying to use USB gadgets, two situations may arise > > [...cut...] > > > Signed-off-by: Miquel Raynal <miquel.ray...@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. Very interesting (and, as you said, way too confusing). I did not even notice the difference, thanks for the explanation. Indeed, it would be nice to simplify this a bit. Thanks, Miquèl