public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Cc: Marek Vasut <marex@denx.de>, Lukasz Majewski <lukma@denx.de>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	u-boot@lists.denx.de
Subject: Re: [PATCH RESEND v2 2/2] usb: udc: Try to clarify an error message
Date: Mon, 2 Oct 2023 17:01:37 +0200	[thread overview]
Message-ID: <20231002170137.353cd4ef@xps-13> (raw)
In-Reply-To: <CAC928Ha_dkjjjfdQdFMiU34UQgfoNbP9zavPDtboADWZrBYD8w@mail.gmail.com>

Hi Massimo,

massimo.pegorer+oss@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.raynal@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@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

  reply	other threads:[~2023-10-02 15:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 13:46 [PATCH RESEND v2 1/2] cmd: bind: Try to improve the (un)bind help Miquel Raynal
2023-10-02 13:46 ` [PATCH RESEND v2 2/2] usb: udc: Try to clarify an error message Miquel Raynal
2023-10-02 14:37   ` Massimo Pegorer
2023-10-02 15:01     ` Miquel Raynal [this message]
2023-10-05 12:33   ` Mattijs Korpershoek
2023-10-05 13:04   ` Marek Vasut
2023-10-05 15:51     ` Miquel Raynal
2023-10-07 21:09       ` Marek Vasut
2023-10-10  8:34         ` Miquel Raynal
2023-10-02 18:56 ` [PATCH RESEND v2 1/2] cmd: bind: Try to improve the (un)bind help Simon Glass
2023-10-05 12:30 ` Mattijs Korpershoek
2023-10-05 13:01 ` Marek Vasut
2023-10-05 15:54   ` Miquel Raynal
2023-10-07 21:03     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231002170137.353cd4ef@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=massimo.pegorer+oss@gmail.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox