All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Linyu Yuan <quic_linyyuan@quicinc.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 3/3] usb: gadget: f_fs: add dev name as prefix for pr_vdebug()
Date: Sat, 25 Mar 2023 10:00:23 +0100	[thread overview]
Message-ID: <ZB64J50M4RmkPJSD@kroah.com> (raw)
In-Reply-To: <1679638227-20496-3-git-send-email-quic_linyyuan@quicinc.com>

On Fri, Mar 24, 2023 at 02:10:27PM +0800, Linyu Yuan wrote:
> when multiple instances in use, the debug message is hard to understand
> as there is no instance name show.
> 
> this change will show each instance name for debug messages.
> 
> Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
> ---
> v2: split to several changes according to v1 comments
> v1: https://lore.kernel.org/linux-usb/1679481369-30094-1-git-send-email-quic_linyyuan@quicinc.com/
> 
>  drivers/usb/gadget/function/f_fs.c | 136 +++++++++++++++++++------------------
>  1 file changed, 69 insertions(+), 67 deletions(-)
> 
> diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
> index a4051c8..df67ab5 100644
> --- a/drivers/usb/gadget/function/f_fs.c
> +++ b/drivers/usb/gadget/function/f_fs.c
> @@ -317,12 +317,12 @@ static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len)
>  static int __ffs_ep0_stall(struct ffs_data *ffs)
>  {
>  	if (ffs->ev.can_stall) {
> -		pr_vdebug("ep0 stall\n");
> +		pr_vdebug("%s: ep0 stall\n", ffs->dev_name);

Again, no, please use dev_dbg() instead.  Do NOT roll your own debugging
macros.  You have access to a struct device pointer for this device that
the driver is controlling, so please always use that instead.

thanks,

greg k-h

  reply	other threads:[~2023-03-25  9:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24  6:10 [PATCH v2 1/3] usb: gadget: f_fs: remove ENTER() macro Linyu Yuan
2023-03-24  6:10 ` [PATCH v2 2/3] usb: gadget: f_fs: add more function with struct ffs_data *ffs parameter Linyu Yuan
2023-03-25  9:01   ` Greg Kroah-Hartman
2023-03-24  6:10 ` [PATCH v2 3/3] usb: gadget: f_fs: add dev name as prefix for pr_vdebug() Linyu Yuan
2023-03-25  9:00   ` Greg Kroah-Hartman [this message]
2023-03-26  2:55     ` Linyu Yuan
2023-03-26  6:29       ` Greg Kroah-Hartman
2023-03-27  1:54         ` Linyu Yuan
2023-03-27  5:46           ` Greg Kroah-Hartman
2023-03-24 16:03 ` [PATCH v2 1/3] usb: gadget: f_fs: remove ENTER() macro kernel test robot
2023-03-24 16:03 ` kernel test robot
2023-03-25  9:02 ` Greg Kroah-Hartman
2023-03-26  2:48   ` Linyu Yuan

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=ZB64J50M4RmkPJSD@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_linyyuan@quicinc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.