Message ID | 1573541519-28488-12-git-send-email-chunfeng.yun@mediatek.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2,01/13] media: uvcvideo: drop error check of debugfs_create_dir() | expand |
On Tue, Nov 12, 2019 at 02:51:58PM +0800, Chunfeng Yun wrote: > Now the USB gadget subsystem can use the USB debugfs root directory, > so move it's directory from the root of the debugfs filesystem into > the root of usb > > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> > --- > v2: > 1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root > --- > drivers/usb/gadget/udc/gr_udc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c > index 7a0e9a58c2d8..5faa09a6c770 100644 > --- a/drivers/usb/gadget/udc/gr_udc.c > +++ b/drivers/usb/gadget/udc/gr_udc.c > @@ -208,7 +208,7 @@ static void gr_dfs_create(struct gr_udc *dev) > { > const char *name = "gr_udc_state"; > > - dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), NULL); > + dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), usb_debug_root); > debugfs_create_file(name, 0444, dev->dfs_root, dev, &gr_dfs_fops); > } > This breaks the build: drivers/usb/gadget/udc/gr_udc.c: In function ‘gr_dfs_create’: drivers/usb/gadget/udc/gr_udc.c:211:57: error: ‘usb_debug_root’ undeclared (first use in this function) 211 | dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), usb_debug_root); | ^~~~~~~~~~~~~~ drivers/usb/gadget/udc/gr_udc.c:211:57: note: each undeclared identifier is reported only once for each function it appears in make[4]: *** [scripts/Makefile.build:265: drivers/usb/gadget/udc/gr_udc.o] Error 1 so I've dropped it from the patch series. Please fix up and resend. And of course, always test-build your patches before you send them out... greg k-h
On Thu, 2019-11-14 at 11:21 +0800, Greg Kroah-Hartman wrote: > On Tue, Nov 12, 2019 at 02:51:58PM +0800, Chunfeng Yun wrote: > > Now the USB gadget subsystem can use the USB debugfs root directory, > > so move it's directory from the root of the debugfs filesystem into > > the root of usb > > > > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> > > --- > > v2: > > 1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root > > --- > > drivers/usb/gadget/udc/gr_udc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c > > index 7a0e9a58c2d8..5faa09a6c770 100644 > > --- a/drivers/usb/gadget/udc/gr_udc.c > > +++ b/drivers/usb/gadget/udc/gr_udc.c > > @@ -208,7 +208,7 @@ static void gr_dfs_create(struct gr_udc *dev) > > { > > const char *name = "gr_udc_state"; > > > > - dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), NULL); > > + dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), usb_debug_root); > > debugfs_create_file(name, 0444, dev->dfs_root, dev, &gr_dfs_fops); > > } > > > > This breaks the build: > drivers/usb/gadget/udc/gr_udc.c: In function ‘gr_dfs_create’: > drivers/usb/gadget/udc/gr_udc.c:211:57: error: ‘usb_debug_root’ undeclared (first use in this function) > 211 | dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), usb_debug_root); > | ^~~~~~~~~~~~~~ > drivers/usb/gadget/udc/gr_udc.c:211:57: note: each undeclared identifier is reported only once for each function it appears in > make[4]: *** [scripts/Makefile.build:265: drivers/usb/gadget/udc/gr_udc.o] Error 1 > > so I've dropped it from the patch series. > > Please fix up and resend. Ok > > And of course, always test-build your patches before you send them > out... Sorry, will do it > > greg k-h
diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c index 7a0e9a58c2d8..5faa09a6c770 100644 --- a/drivers/usb/gadget/udc/gr_udc.c +++ b/drivers/usb/gadget/udc/gr_udc.c @@ -208,7 +208,7 @@ static void gr_dfs_create(struct gr_udc *dev) { const char *name = "gr_udc_state"; - dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), NULL); + dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), usb_debug_root); debugfs_create_file(name, 0444, dev->dfs_root, dev, &gr_dfs_fops); }
Now the USB gadget subsystem can use the USB debugfs root directory, so move it's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> --- v2: 1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root --- drivers/usb/gadget/udc/gr_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)