public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Johan Hovold <johan@kernel.org>
Cc: Tony Chung <tony467913@gmail.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 4/6] drivers: usb: serial: mos7840: using '__func__' to replace function name in dbg message
Date: Tue, 11 Feb 2025 10:32:14 +0100	[thread overview]
Message-ID: <2025021133-smooth-villain-bed8@gregkh> (raw)
In-Reply-To: <Z6sYclmvaAQ93bEI@hovoldconsulting.com>

On Tue, Feb 11, 2025 at 10:29:22AM +0100, Johan Hovold wrote:
> On Fri, Oct 25, 2024 at 02:17:14PM +0800, Tony Chung wrote:
> > fix warning of Prefer '"%s...",__func__' to using 'function name'.
> > 
> > Signed-off-by: Tony Chung <tony467913@gmail.com>
> > ---
> >  drivers/usb/serial/mos7840.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
> > index b48a26468..31ec2cf1b 100644
> > --- a/drivers/usb/serial/mos7840.c
> > +++ b/drivers/usb/serial/mos7840.c
> > @@ -230,7 +230,7 @@ static int mos7840_set_reg_sync(struct usb_serial_port *port, __u16 reg,
> >  	struct usb_device *dev = port->serial->dev;
> >  
> >  	val = val & 0x00ff;
> > -	dev_dbg(&port->dev, "mos7840_set_reg_sync offset is %x, value %x\n", reg, val);
> > +	dev_dbg(&port->dev, "%s offset is %x, value %x\n", __func__, reg, val);
> 
> I suggest you just leave this as is.

__func__ should NEVER be added to dev_dbg() lines as it is already
available if the user want it.  Adding it explicitly to the string is
just redundant.

thanks,

greg k-h

  reply	other threads:[~2025-02-11  9:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23  9:14 [PATCH] usb: serial: mos7840: Fix coding style warnings Tony Chung
2024-10-23 10:04 ` Greg KH
2024-10-24 17:37 ` kernel test robot
2024-10-24 17:58 ` kernel test robot
2024-10-25  6:17   ` [PATCH v2 0/6] " Tony Chung
2025-02-11  9:15     ` Johan Hovold
2024-10-25  6:17   ` [PATCH v2 1/6] driver: usb: serial: mos7840: fix " Tony Chung
2025-02-11  9:20     ` Johan Hovold
2024-10-25  6:17   ` [PATCH v2 2/6] drivers: usb: serial: mos7840: Fix Block comments coding " Tony Chung
2025-02-11  9:27     ` Johan Hovold
2024-10-25  6:17   ` [PATCH v2 3/6] drivers: usb: serial: mos7840: fix " Tony Chung
2025-02-11  9:28     ` Johan Hovold
2024-10-25  6:17   ` [PATCH v2 4/6] drivers: usb: serial: mos7840: using '__func__' to replace function name in dbg message Tony Chung
2025-02-11  9:29     ` Johan Hovold
2025-02-11  9:32       ` Greg KH [this message]
2025-02-11  9:38         ` Johan Hovold
2024-10-25  6:17   ` [PATCH v2 5/6] drivers: usb: serial: mos7840: replace 'unsigned' w/ 'unsigned int' Tony Chung
2025-02-11  9:31     ` Johan Hovold
2024-10-25  6:17   ` [PATCH v2 6/6] drivers: usb: serial: mos7840: fix the quoted string split across lines Tony Chung
2025-02-11  9:32     ` Johan Hovold
2024-10-25  7:49 ` [PATCH] usb: serial: mos7840: Fix coding style warnings kernel test robot
2024-10-28  5:27   ` Tony Chung

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=2025021133-smooth-villain-bed8@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tony467913@gmail.com \
    /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