RE: [PATCH] usb: dwc3: add debugfs node to dump FIFO/Queue available space

From: Du, Changbin
Date: Wed Apr 06 2016 - 07:38:29 EST


> > This can be used to check some special issues, like whether data is
> > successfully copied from memory to fifo when a trb is blocked.
> >
> > Signed-off-by: Du, Changbin <changbin.du@xxxxxxxxx>
> > ---
> > drivers/usb/dwc3/core.h | 5 +++++
> > drivers/usb/dwc3/debugfs.c | 45
> +++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 50 insertions(+)
>
> Why did you not include the linux-usb@vger mailing list?
>
Just forget it :)

> > static int dwc3_testmode_show(struct seq_file *s, void *unused)
> > {
> > struct dwc3 *dwc = s->private;
> > @@ -648,6 +687,12 @@ int dwc3_debugfs_init(struct dwc3 *dwc)
> > goto err1;
> > }
> >
> > + file = debugfs_create_file("fifo", S_IRUGO, root, dwc,
> &dwc3_fifo_fops);
> > + if (!file) {
> > + ret = -ENOMEM;
>
> Um, no, that's not the error here. You shouldn't care at all about
> debugfs api call results. Just keep moving on here please.
>
> thanks,
>
> greg k-h

Agree with you. I will create another patch to cleanup this piece of code.
And I found a memory leak issue there, dwc->regset never released. Will also fix it.

Thanks,
Du, Changbin