Re: [PATCH v3 5/6] usb: gadget: f_fs: replace private pr_vdebug() with dev_vdbg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 29, 2023 at 03:01:49PM +0800, Linyu Yuan wrote:
> 
> On 3/29/2023 2:55 PM, Greg Kroah-Hartman wrote:
> > 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@xxxxxxxxxxx>
> > > ---
> > > 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?
> 
> 
> just keep original design, if you accept, will change to dev_dbg().

Please do.



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux