linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir()
@ 2019-11-14 10:41 Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 02/13] usb: chipidea: debug: create debugfs directory under usb root Chunfeng Yun
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

No need check the return value of debugfs_create_dir()

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v3: no changes

v2:
  1. abandon new API usb_debugfs_create_dir(), and drop error check
---
 drivers/media/usb/uvc/uvc_debugfs.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_debugfs.c b/drivers/media/usb/uvc/uvc_debugfs.c
index d2b109959d82..2b8af4b54117 100644
--- a/drivers/media/usb/uvc/uvc_debugfs.c
+++ b/drivers/media/usb/uvc/uvc_debugfs.c
@@ -108,15 +108,7 @@ void uvc_debugfs_cleanup_stream(struct uvc_streaming *stream)
 
 void uvc_debugfs_init(void)
 {
-	struct dentry *dir;
-
-	dir = debugfs_create_dir("uvcvideo", usb_debug_root);
-	if (IS_ERR_OR_NULL(dir)) {
-		uvc_printk(KERN_INFO, "Unable to create debugfs directory\n");
-		return;
-	}
-
-	uvc_debugfs_root_dir = dir;
+	uvc_debugfs_root_dir = debugfs_create_dir("uvcvideo", usb_debug_root);
 }
 
 void uvc_debugfs_cleanup(void)
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 02/13] usb: chipidea: debug: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 03/13] usb: host: imx21: " Chunfeng Yun
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

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>
---
v3: no changes

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/chipidea/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
index fcc91a338875..e0376ee646ad 100644
--- a/drivers/usb/chipidea/debug.c
+++ b/drivers/usb/chipidea/debug.c
@@ -342,7 +342,7 @@ DEFINE_SHOW_ATTRIBUTE(ci_registers);
  */
 void dbg_create_files(struct ci_hdrc *ci)
 {
-	ci->debugfs = debugfs_create_dir(dev_name(ci->dev), NULL);
+	ci->debugfs = debugfs_create_dir(dev_name(ci->dev), usb_debug_root);
 
 	debugfs_create_file("device", S_IRUGO, ci->debugfs, ci,
 			    &ci_device_fops);
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 03/13] usb: host: imx21: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 02/13] usb: chipidea: debug: create debugfs directory under usb root Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 04/13] usb: dwc3: " Chunfeng Yun
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

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>
---
v3: no changes

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/host/imx21-dbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/imx21-dbg.c b/drivers/usb/host/imx21-dbg.c
index 7fcf1d9dd7f3..02a1344fbd6a 100644
--- a/drivers/usb/host/imx21-dbg.c
+++ b/drivers/usb/host/imx21-dbg.c
@@ -419,7 +419,7 @@ static void create_debug_files(struct imx21 *imx21)
 {
 	struct dentry *root;
 
-	root = debugfs_create_dir(dev_name(imx21->dev), NULL);
+	root = debugfs_create_dir(dev_name(imx21->dev), usb_debug_root);
 	imx21->debug_root = root;
 
 	debugfs_create_file("status", S_IRUGO, root, imx21, &debug_status_fops);
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 04/13] usb: dwc3: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 02/13] usb: chipidea: debug: create debugfs directory under usb root Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 03/13] usb: host: imx21: " Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 05/13] usb: musb: " Chunfeng Yun
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

Now the USB gadget subsystem can use the USB debugfs root directory,
so move dwc3's directory from the root of the debugfs filesystem into
the root of usb

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v3: no changes

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/dwc3/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c
index 1c792710348f..4fe8b1e1485c 100644
--- a/drivers/usb/dwc3/debugfs.c
+++ b/drivers/usb/dwc3/debugfs.c
@@ -916,7 +916,7 @@ void dwc3_debugfs_init(struct dwc3 *dwc)
 	dwc->regset->nregs = ARRAY_SIZE(dwc3_regs);
 	dwc->regset->base = dwc->regs - DWC3_GLOBALS_REGS_START;
 
-	root = debugfs_create_dir(dev_name(dwc->dev), NULL);
+	root = debugfs_create_dir(dev_name(dwc->dev), usb_debug_root);
 	dwc->root = root;
 
 	debugfs_create_regset32("regdump", S_IRUGO, root, dwc->regset);
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 05/13] usb: musb: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (2 preceding siblings ...)
  2019-11-14 10:41 ` [PATCH v3 04/13] usb: dwc3: " Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 06/13] usb: musb: dsps: " Chunfeng Yun
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

Now the USB gadget subsystem can use the USB debugfs root directory,
so move musb's directory from the root of the debugfs filesystem into
the root of usb

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v3: no changes

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/musb/musb_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c
index f42858e2b54c..7b6281ab62ed 100644
--- a/drivers/usb/musb/musb_debugfs.c
+++ b/drivers/usb/musb/musb_debugfs.c
@@ -325,7 +325,7 @@ void musb_init_debugfs(struct musb *musb)
 {
 	struct dentry *root;
 
-	root = debugfs_create_dir(dev_name(musb->controller), NULL);
+	root = debugfs_create_dir(dev_name(musb->controller), usb_debug_root);
 	musb->debugfs_root = root;
 
 	debugfs_create_file("regdump", S_IRUGO, root, musb, &musb_regdump_fops);
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 06/13] usb: musb: dsps: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (3 preceding siblings ...)
  2019-11-14 10:41 ` [PATCH v3 05/13] usb: musb: " Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 07/13] usb: dwc2: " Chunfeng Yun
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

Now the USB gadget subsystem can use the USB debugfs root directory,
so move dsps's directory from the root of the debugfs filesystem into
the root of usb

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v3: no changes

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/musb/musb_dsps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 327d4f7baaf7..88923175f71e 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -411,7 +411,7 @@ static int dsps_musb_dbg_init(struct musb *musb, struct dsps_glue *glue)
 	char buf[128];
 
 	sprintf(buf, "%s.dsps", dev_name(musb->controller));
-	root = debugfs_create_dir(buf, NULL);
+	root = debugfs_create_dir(buf, usb_debug_root);
 	glue->dbgfs_root = root;
 
 	glue->regset.regs = dsps_musb_regs;
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 07/13] usb: dwc2: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (4 preceding siblings ...)
  2019-11-14 10:41 ` [PATCH v3 06/13] usb: musb: dsps: " Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 08/13] usb: gadget: bcm63xx_udc: " Chunfeng Yun
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

Now the USB gadget subsystem can use the USB debugfs root directory,
so move dwc2's directory from the root of the debugfs filesystem into
the root of usb

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v3: no changes

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/dwc2/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c
index 7f62f4cdc265..b8f2790abf91 100644
--- a/drivers/usb/dwc2/debugfs.c
+++ b/drivers/usb/dwc2/debugfs.c
@@ -770,7 +770,7 @@ int dwc2_debugfs_init(struct dwc2_hsotg *hsotg)
 	int			ret;
 	struct dentry		*root;
 
-	root = debugfs_create_dir(dev_name(hsotg->dev), NULL);
+	root = debugfs_create_dir(dev_name(hsotg->dev), usb_debug_root);
 	hsotg->debug_root = root;
 
 	debugfs_create_file("params", 0444, root, hsotg, &params_fops);
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 08/13] usb: gadget: bcm63xx_udc: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (5 preceding siblings ...)
  2019-11-14 10:41 ` [PATCH v3 07/13] usb: dwc2: " Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 09/13] usb: gadget: atmel: " Chunfeng Yun
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

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>
---
v3:
  1. fix up build error of undefined usb_debug_root

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/gadget/udc/bcm63xx_udc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
index 97b16463f3ef..167d41618ecf 100644
--- a/drivers/usb/gadget/udc/bcm63xx_udc.c
+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
@@ -26,6 +26,7 @@
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 #include <linux/timer.h>
+#include <linux/usb.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/workqueue.h>
@@ -2248,7 +2249,7 @@ static void bcm63xx_udc_init_debugfs(struct bcm63xx_udc *udc)
 	if (!IS_ENABLED(CONFIG_USB_GADGET_DEBUG_FS))
 		return;
 
-	root = debugfs_create_dir(udc->gadget.name, NULL);
+	root = debugfs_create_dir(udc->gadget.name, usb_debug_root);
 	udc->debugfs_root = root;
 
 	debugfs_create_file("usbd", 0400, root, udc, &bcm63xx_usbd_dbg_fops);
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 09/13] usb: gadget: atmel: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (6 preceding siblings ...)
  2019-11-14 10:41 ` [PATCH v3 08/13] usb: gadget: bcm63xx_udc: " Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 10/13] usb: gadget: udc: renesas_usb3: " Chunfeng Yun
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

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>
---
v3:
  1. fix up build error of undefined usb_debug_root

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 86ffc8307864..48027e486e6b 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -18,6 +18,7 @@
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/ctype.h>
+#include <linux/usb.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/delay.h>
@@ -226,7 +227,7 @@ static void usba_init_debugfs(struct usba_udc *udc)
 	struct dentry *root;
 	struct resource *regs_resource;
 
-	root = debugfs_create_dir(udc->gadget.name, NULL);
+	root = debugfs_create_dir(udc->gadget.name, usb_debug_root);
 	udc->debugfs_root = root;
 
 	regs_resource = platform_get_resource(udc->pdev, IORESOURCE_MEM,
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 10/13] usb: gadget: udc: renesas_usb3: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (7 preceding siblings ...)
  2019-11-14 10:41 ` [PATCH v3 09/13] usb: gadget: atmel: " Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-15  5:33   ` Yoshihiro Shimoda
  2019-11-14 10:41 ` [PATCH v3 11/13] usb: gadget: pxa27x: " Chunfeng Yun
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

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>
---
v3: no changes

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/gadget/udc/renesas_usb3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c
index e098f16c01cb..4dde69e7f6b1 100644
--- a/drivers/usb/gadget/udc/renesas_usb3.c
+++ b/drivers/usb/gadget/udc/renesas_usb3.c
@@ -2535,7 +2535,7 @@ static const struct file_operations renesas_usb3_b_device_fops = {
 static void renesas_usb3_debugfs_init(struct renesas_usb3 *usb3,
 				      struct device *dev)
 {
-	usb3->dentry = debugfs_create_dir(dev_name(dev), NULL);
+	usb3->dentry = debugfs_create_dir(dev_name(dev), usb_debug_root);
 
 	debugfs_create_file("b_device", 0644, usb3->dentry, usb3,
 			    &renesas_usb3_b_device_fops);
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 11/13] usb: gadget: pxa27x: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (8 preceding siblings ...)
  2019-11-14 10:41 ` [PATCH v3 10/13] usb: gadget: udc: renesas_usb3: " Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 12/13] usb: gadget: udc: gr_udc: " Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 13/13] usb: gadget: udc: s3c2410_udc: " Chunfeng Yun
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

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>
---
v3: no changes

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/gadget/udc/pxa27x_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 014233252299..27ea46287772 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -207,7 +207,7 @@ static void pxa_init_debugfs(struct pxa_udc *udc)
 {
 	struct dentry *root;
 
-	root = debugfs_create_dir(udc->gadget.name, NULL);
+	root = debugfs_create_dir(udc->gadget.name, usb_debug_root);
 	udc->debugfs_root = root;
 
 	debugfs_create_file("udcstate", 0400, root, udc, &state_dbg_fops);
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 12/13] usb: gadget: udc: gr_udc: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (9 preceding siblings ...)
  2019-11-14 10:41 ` [PATCH v3 11/13] usb: gadget: pxa27x: " Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  2019-11-14 10:41 ` [PATCH v3 13/13] usb: gadget: udc: s3c2410_udc: " Chunfeng Yun
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

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>
---
v3:
  1. fix up build error of undefined usb_debug_root

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/gadget/udc/gr_udc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c
index 7a0e9a58c2d8..5d5a0bc79757 100644
--- a/drivers/usb/gadget/udc/gr_udc.c
+++ b/drivers/usb/gadget/udc/gr_udc.c
@@ -29,6 +29,7 @@
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <linux/device.h>
+#include <linux/usb.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/dma-mapping.h>
@@ -208,7 +209,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);
 }
 
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 13/13] usb: gadget: udc: s3c2410_udc: create debugfs directory under usb root
  2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (10 preceding siblings ...)
  2019-11-14 10:41 ` [PATCH v3 12/13] usb: gadget: udc: gr_udc: " Chunfeng Yun
@ 2019-11-14 10:41 ` Chunfeng Yun
  11 siblings, 0 replies; 14+ messages in thread
From: Chunfeng Yun @ 2019-11-14 10:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Chunfeng Yun, Cristian Birsan, linux-media, Fabrizio Castro,
	Sascha Hauer, Haojian Zhuang, Stephen Boyd, linux-mediatek,
	Matthias Brugger, Mauro Carvalho Chehab, Bin Liu,
	linux-arm-kernel, Biju Das, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

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>
---
v3: no changes

v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/gadget/udc/s3c2410_udc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c
index f82208fbc249..0507a2ca0f55 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc.c
+++ b/drivers/usb/gadget/udc/s3c2410_udc.c
@@ -1978,7 +1978,8 @@ static int __init udc_init(void)
 
 	dprintk(DEBUG_NORMAL, "%s\n", gadget_name);
 
-	s3c2410_udc_debugfs_root = debugfs_create_dir(gadget_name, NULL);
+	s3c2410_udc_debugfs_root = debugfs_create_dir(gadget_name,
+						      usb_debug_root);
 
 	retval = platform_driver_register(&udc_driver_24x0);
 	if (retval)
-- 
2.23.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* RE: [PATCH v3 10/13] usb: gadget: udc: renesas_usb3: create debugfs directory under usb root
  2019-11-14 10:41 ` [PATCH v3 10/13] usb: gadget: udc: renesas_usb3: " Chunfeng Yun
@ 2019-11-15  5:33   ` Yoshihiro Shimoda
  0 siblings, 0 replies; 14+ messages in thread
From: Yoshihiro Shimoda @ 2019-11-15  5:33 UTC (permalink / raw)
  To: Chunfeng Yun, Greg Kroah-Hartman, Felipe Balbi
  Cc: Peter Chen, Alexandre Belloni, Gustavo A. R. Silva, Yangtao Li,
	linux-kernel, Minas Harutyunyan, Laurent Pinchart, Fabio Estevam,
	Florian Fainelli, Robert Jarzmik, Kevin Cernekee,
	Ludovic Desroches, bcm-kernel-feedback-list, NXP Linux Team,
	Cristian Birsan, linux-media, Fabrizio Castro, Sascha Hauer,
	Haojian Zhuang, Stephen Boyd, linux-mediatek, Matthias Brugger,
	Mauro Carvalho Chehab, Bin Liu, linux-arm-kernel, Biju Das,
	linux-usb, Nicolas Ferre, Pengutronix Kernel Team,
	Colin Ian King, Shawn Guo, Daniel Mack

Hi Chunfeng-san,

> From: Chunfeng Yun, Sent: Thursday, November 14, 2019 7:41 PM
> 
> 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>

Thank you for the patch! When I apply this patch on the Greg's usb.git /
usb-next branch, the following warning happens:

$ patch -p1 < ~/Downloads/v3-10-13-usb-gadget-udc-renesas_usb3-create-debugfs-directory-under-usb-root.patch
patching file drivers/usb/gadget/udc/renesas_usb3.c
Hunk #1 succeeded at 2536 (offset 1 line).

I'm not sure we should fix it strictly though, this patch seems good to me. So,

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

And, I tested this patch on my environment and confirmed that
the debug file moved from /sys/kernel/debug to /sys/kernel/debug/usb. So,

Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda


> ---
> v3: no changes
> 
> v2:
>   1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
> ---
>  drivers/usb/gadget/udc/renesas_usb3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c
> index e098f16c01cb..4dde69e7f6b1 100644
> --- a/drivers/usb/gadget/udc/renesas_usb3.c
> +++ b/drivers/usb/gadget/udc/renesas_usb3.c
> @@ -2535,7 +2535,7 @@ static const struct file_operations renesas_usb3_b_device_fops = {
>  static void renesas_usb3_debugfs_init(struct renesas_usb3 *usb3,
>  				      struct device *dev)
>  {
> -	usb3->dentry = debugfs_create_dir(dev_name(dev), NULL);
> +	usb3->dentry = debugfs_create_dir(dev_name(dev), usb_debug_root);
> 
>  	debugfs_create_file("b_device", 0644, usb3->dentry, usb3,
>  			    &renesas_usb3_b_device_fops);
> --
> 2.23.0

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-11-15  5:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-14 10:41 [PATCH v3 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 02/13] usb: chipidea: debug: create debugfs directory under usb root Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 03/13] usb: host: imx21: " Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 04/13] usb: dwc3: " Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 05/13] usb: musb: " Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 06/13] usb: musb: dsps: " Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 07/13] usb: dwc2: " Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 08/13] usb: gadget: bcm63xx_udc: " Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 09/13] usb: gadget: atmel: " Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 10/13] usb: gadget: udc: renesas_usb3: " Chunfeng Yun
2019-11-15  5:33   ` Yoshihiro Shimoda
2019-11-14 10:41 ` [PATCH v3 11/13] usb: gadget: pxa27x: " Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 12/13] usb: gadget: udc: gr_udc: " Chunfeng Yun
2019-11-14 10:41 ` [PATCH v3 13/13] usb: gadget: udc: s3c2410_udc: " Chunfeng Yun

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).