lkml.org 
[lkml]   [2023]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 1/2] usb: serial: add support for CH348
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

\
 
 \ /
  Last update: 2023-03-27 00:25    [W:0.068 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site