mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Corentin Labbe <clabbe@baylibre.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH v5 1/2] usb: serial: add support for CH348
Date: Thu, 16 Feb 2023 11:49:35 +0100	[thread overview]
Message-ID: <Y+4KP/WdObzJTwOj@hovoldconsulting.com> (raw)
In-Reply-To: <Y+4Fpd0lcJkQrXef@kroah.com>

On Thu, Feb 16, 2023 at 11:29:57AM +0100, Greg Kroah-Hartman wrote:
> On Thu, Feb 16, 2023 at 10:14:57AM +0100, Johan Hovold wrote:
> > > +	if (urb->actual_length < 2) {
> > > +		dev_dbg(&port->dev, "%s:%d empty rx buffer\n", __func__, __LINE__);
> > 
> > I'm sure I've asked you drop __LINE__. Please be more careful when
> > considering review comments.
> 
> FYI, __func__ and __LINE__ are included automatically in dev_dbg() calls
> so any addition in the string for them is redundant and should never be
> there (it's also a hint that no one used this debug statement as the
> redundancy would be kind of obvious...)

Not exactly automatically since you need to explicitly request that they
are included, but yes, they are redundant.

__func__ may sometimes be useful for compact debug messages, though. As
an example, "get_chars - 5" is self-contained, while simply printing "5"
doesn't make any sense unless you also enable function prefixes.

Johan

  reply	other threads:[~2023-02-16 10:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06 13:53 [PATCH v5 0/2] " Corentin Labbe
2023-01-06 13:53 ` [PATCH v5 1/2] " Corentin Labbe
2023-02-16  9:14   ` Johan Hovold
2023-02-16 10:29     ` Greg KH
2023-02-16 10:49       ` Johan Hovold [this message]
2023-05-21 22:21   ` David Heidelberg
2023-01-06 13:53 ` [PATCH v5 2/2] usb: serial: add myself as maintainer of CH348 Corentin Labbe
2023-02-16  9:22   ` Johan Hovold
2023-01-14 21:05 [PATCH v5 1/2] usb: serial: add support for CH348 David Heidelberg
2023-01-16  8:04 ` Johan Hovold

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=Y+4KP/WdObzJTwOj@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=clabbe@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®