linux-usb.vger.kernel.org archive mirror
 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 v3 5/6] usb: gadget: f_fs: replace private pr_vdebug() with dev_vdbg
Date: Wed, 29 Mar 2023 08:55:29 +0200	[thread overview]
Message-ID: <ZCPg4U-DwidG3xf1@kroah.com> (raw)
In-Reply-To: <1679911940-4727-5-git-send-email-quic_linyyuan@quicinc.com>

On Mon, Mar 27, 2023 at 06:12:19PM +0800, Linyu Yuan wrote:
> Use command dev_vdbg() macro to show some debug message.
> 
> Also replace some pr_debug/err/warn/info() to dev_dbg/err/warn/info().
> 
> Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
> ---
> v3: new patch in this version
> 
>  drivers/usb/gadget/function/f_fs.c | 98 +++++++++++++++++++-------------------
>  drivers/usb/gadget/function/u_fs.h |  6 ---
>  2 files changed, 49 insertions(+), 55 deletions(-)
> 
> diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
> index 25461f1..0761eaa 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");
> +		dev_vdbg(ffs->dev, "ep0 stall\n");
>  		usb_ep_set_halt(ffs->gadget->ep0);
>  		ffs->setup_state = FFS_NO_SETUP;
>  		return -EL2HLT;
>  	} else {
> -		pr_debug("bogus ep0 stall!\n");
> +		dev_dbg(ffs->dev, "bogus ep0 stall!\n");
>  		return -ESRCH;
>  	}
>  }
> @@ -361,7 +361,7 @@ static ssize_t ffs_ep0_write(struct file *file, const char __user *buf,
>  
>  		/* Handle data */
>  		if (ffs->state == FFS_READ_DESCRIPTORS) {
> -			pr_info("read descriptors\n");
> +			dev_info(ffs->dev, "read descriptors\n");

When a driver works properly, it should be quiet.  Why is this driver
being noisy for normal operations?  Shouldn't these types of messages be
moved to be debugging only?

thanks,

greg k-h

  reply	other threads:[~2023-03-29  6:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 10:12 [PATCH v3 1/6] usb: gadget: ffs: remove ENTER() macro Linyu Yuan
2023-03-27 10:12 ` [PATCH v3 2/6] usb: gadget: f_fs: add more function with struct ffs_data *ffs parameter Linyu Yuan
2023-03-27 10:12 ` [PATCH v3 3/6] usb: gadget: f_fs: remove struct ffs_data *ffs from struct ffs_desc_helper Linyu Yuan
2023-03-27 10:12 ` [PATCH v3 4/6] usb: gadget: f_fs: add a device reference of usb_gadget->dev Linyu Yuan
2023-03-29  6:53   ` Greg Kroah-Hartman
2023-03-29  7:00     ` Linyu Yuan
2023-03-29  7:31       ` Greg Kroah-Hartman
2023-03-29  7:46         ` Linyu Yuan
2023-03-29  8:21           ` Greg Kroah-Hartman
2023-03-29  9:20             ` Linyu Yuan
2023-03-27 10:12 ` [PATCH v3 5/6] usb: gadget: f_fs: replace private pr_vdebug() with dev_vdbg Linyu Yuan
2023-03-29  6:55   ` Greg Kroah-Hartman [this message]
2023-03-29  7:01     ` Linyu Yuan
2023-03-29  7:31       ` Greg Kroah-Hartman
2023-03-27 10:12 ` [PATCH v3 6/6] usb: gadget: f_fs: show instance name in debug message Linyu Yuan
2023-03-29  6:54   ` Greg Kroah-Hartman
2023-03-29  7:11     ` Linyu Yuan
2023-03-29  7:37       ` Greg Kroah-Hartman
2023-03-29  7:42         ` Linyu Yuan
2023-03-29  8:21           ` Greg Kroah-Hartman
2023-03-29  8:46             ` 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=ZCPg4U-DwidG3xf1@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).