linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir()
@ 2019-11-12  6:51 Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 02/13] usb: chipidea: debug: create debugfs directory under usb root Chunfeng Yun
                   ` (11 more replies)
  0 siblings, 12 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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] 20+ messages in thread

* [PATCH v2 02/13] usb: chipidea: debug: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 03/13] usb: host: imx21: " Chunfeng Yun
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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] 20+ messages in thread

* [PATCH v2 03/13] usb: host: imx21: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 02/13] usb: chipidea: debug: create debugfs directory under usb root Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 04/13] usb: dwc3: " Chunfeng Yun
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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] 20+ messages in thread

* [PATCH v2 04/13] usb: dwc3: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 02/13] usb: chipidea: debug: create debugfs directory under usb root Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 03/13] usb: host: imx21: " Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 05/13] usb: musb: " Chunfeng Yun
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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] 20+ messages in thread

* [PATCH v2 05/13] usb: musb: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (2 preceding siblings ...)
  2019-11-12  6:51 ` [PATCH v2 04/13] usb: dwc3: " Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-12 15:28   ` Bin Liu
  2019-11-12  6:51 ` [PATCH v2 06/13] usb: musb: dsps: " Chunfeng Yun
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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] 20+ messages in thread

* [PATCH v2 06/13] usb: musb: dsps: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (3 preceding siblings ...)
  2019-11-12  6:51 ` [PATCH v2 05/13] usb: musb: " Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 07/13] usb: dwc2: " Chunfeng Yun
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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] 20+ messages in thread

* [PATCH v2 07/13] usb: dwc2: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (4 preceding siblings ...)
  2019-11-12  6:51 ` [PATCH v2 06/13] usb: musb: dsps: " Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 08/13] usb: gadget: bcm63xx_udc: " Chunfeng Yun
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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] 20+ messages in thread

* [PATCH v2 08/13] usb: gadget: bcm63xx_udc: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (5 preceding siblings ...)
  2019-11-12  6:51 ` [PATCH v2 07/13] usb: dwc2: " Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 09/13] usb: gadget: atmel: " Chunfeng Yun
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/gadget/udc/bcm63xx_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
index 97b16463f3ef..166df4215042 100644
--- a/drivers/usb/gadget/udc/bcm63xx_udc.c
+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
@@ -2248,7 +2248,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] 20+ messages in thread

* [PATCH v2 09/13] usb: gadget: atmel: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (6 preceding siblings ...)
  2019-11-12  6:51 ` [PATCH v2 08/13] usb: gadget: bcm63xx_udc: " Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 10/13] usb: gadget: udc: renesas_usb3: " Chunfeng Yun
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
v2:
  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 86ffc8307864..e20edb8afe81 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -226,7 +226,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] 20+ messages in thread

* [PATCH v2 10/13] usb: gadget: udc: renesas_usb3: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (7 preceding siblings ...)
  2019-11-12  6:51 ` [PATCH v2 09/13] usb: gadget: atmel: " Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 11/13] usb: gadget: pxa27x: " Chunfeng Yun
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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] 20+ messages in thread

* [PATCH v2 11/13] usb: gadget: pxa27x: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (8 preceding siblings ...)
  2019-11-12  6:51 ` [PATCH v2 10/13] usb: gadget: udc: renesas_usb3: " Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 12/13] usb: gadget: udc: gr_udc: " Chunfeng Yun
  2019-11-12  6:51 ` [PATCH v2 13/13] usb: gadget: udc: s3c2410_udc: " Chunfeng Yun
  11 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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] 20+ messages in thread

* [PATCH v2 12/13] usb: gadget: udc: gr_udc: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (9 preceding siblings ...)
  2019-11-12  6:51 ` [PATCH v2 11/13] usb: gadget: pxa27x: " Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  2019-11-14  3:21   ` Greg Kroah-Hartman
  2019-11-12  6:51 ` [PATCH v2 13/13] usb: gadget: udc: s3c2410_udc: " Chunfeng Yun
  11 siblings, 1 reply; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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);
 }
 
-- 
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] 20+ messages in thread

* [PATCH v2 13/13] usb: gadget: udc: s3c2410_udc: create debugfs directory under usb root
  2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
                   ` (10 preceding siblings ...)
  2019-11-12  6:51 ` [PATCH v2 12/13] usb: gadget: udc: gr_udc: " Chunfeng Yun
@ 2019-11-12  6:51 ` Chunfeng Yun
  11 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-12  6:51 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>
---
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] 20+ messages in thread

* Re: [PATCH v2 05/13] usb: musb: create debugfs directory under usb root
  2019-11-12  6:51 ` [PATCH v2 05/13] usb: musb: " Chunfeng Yun
@ 2019-11-12 15:28   ` Bin Liu
  2019-11-14  3:20     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 20+ messages in thread
From: Bin Liu @ 2019-11-12 15:28 UTC (permalink / raw)
  To: Chunfeng Yun
  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, linux-arm-kernel, Biju Das, Felipe Balbi,
	Greg Kroah-Hartman, Yoshihiro Shimoda, linux-usb, Nicolas Ferre,
	Pengutronix Kernel Team, Colin Ian King, Shawn Guo, Daniel Mack

Hi,

On Tue, Nov 12, 2019 at 02:51:51PM +0800, Chunfeng Yun wrote:
> 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

My opinion is this move is unnecessary. I breaks existing debug tools or
documentation which is already published on Internet. 

-Bin.


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

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

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

On Tue, Nov 12, 2019 at 09:28:57AM -0600, Bin Liu wrote:
> Hi,
> 
> On Tue, Nov 12, 2019 at 02:51:51PM +0800, Chunfeng Yun wrote:
> > 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
> 
> My opinion is this move is unnecessary. I breaks existing debug tools or
> documentation which is already published on Internet. 

Having a "root" directory for a single random driver seems like you are
making your driver a "very important" thing in the overall scheme of the
kernel, right?  What's wrong with using the usb subdirectory like all
other USB drivers use (after this patch series is merged)?  That feels
like a much more "sane" way to handle the wide-open debugfs namespace.

Yes, there are no rules when it comes to debugfs file names and
locations, but let's try to be sane please.

thanks,

greg k-h

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

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

* Re: [PATCH v2 12/13] usb: gadget: udc: gr_udc: create debugfs directory under usb root
  2019-11-12  6:51 ` [PATCH v2 12/13] usb: gadget: udc: gr_udc: " Chunfeng Yun
@ 2019-11-14  3:21   ` Greg Kroah-Hartman
  2019-11-14  8:24     ` Chunfeng Yun
  0 siblings, 1 reply; 20+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-14  3:21 UTC (permalink / raw)
  To: Chunfeng Yun
  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,
	Felipe Balbi, Yoshihiro Shimoda, linux-usb, Nicolas Ferre,
	Pengutronix Kernel Team, Colin Ian King, Shawn Guo, Daniel Mack

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

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

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

* Re: [PATCH v2 12/13] usb: gadget: udc: gr_udc: create debugfs directory under usb root
  2019-11-14  3:21   ` Greg Kroah-Hartman
@ 2019-11-14  8:24     ` Chunfeng Yun
  0 siblings, 0 replies; 20+ messages in thread
From: Chunfeng Yun @ 2019-11-14  8:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  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,
	Felipe Balbi, Yoshihiro Shimoda, linux-usb, Nicolas Ferre,
	Pengutronix Kernel Team, Colin Ian King, Shawn Guo, Daniel Mack

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

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

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

* Re: [PATCH v2 05/13] usb: musb: create debugfs directory under usb root
  2019-11-14  3:20     ` Greg Kroah-Hartman
@ 2019-11-14 14:02       ` Bin Liu
  2019-11-15  3:21         ` Greg Kroah-Hartman
  0 siblings, 1 reply; 20+ messages in thread
From: Bin Liu @ 2019-11-14 14:02 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  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, linux-arm-kernel,
	Biju Das, Felipe Balbi, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

On Thu, Nov 14, 2019 at 11:20:18AM +0800, Greg Kroah-Hartman wrote:
> On Tue, Nov 12, 2019 at 09:28:57AM -0600, Bin Liu wrote:
> > Hi,
> > 
> > On Tue, Nov 12, 2019 at 02:51:51PM +0800, Chunfeng Yun wrote:
> > > 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
> > 
> > My opinion is this move is unnecessary. I breaks existing debug tools or
> > documentation which is already published on Internet. 
> 
> Having a "root" directory for a single random driver seems like you are
> making your driver a "very important" thing in the overall scheme of the
> kernel, right?  What's wrong with using the usb subdirectory like all

Agree, it wasn't the right thing to do at the first place. But now
changing it adds support burden, because people very often refer to the
old information on the internet which no longer matches to the new
location. Basically, it is a cost of ABI change.

> other USB drivers use (after this patch series is merged)?  That feels
> like a much more "sane" way to handle the wide-open debugfs namespace.

Though I commented on this musb patch, my opinion is for this whole
series, either drop the whole series or apply the whole series.

> Yes, there are no rules when it comes to debugfs file names and
> locations, but let's try to be sane please.

Fine with me. I can still support questions such as "can't open
/sys/kernel/debug/musb-hdrc.0/testmode: No such file or directory".

-Bin.

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

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

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

On Thu, Nov 14, 2019 at 08:02:34AM -0600, Bin Liu wrote:
> On Thu, Nov 14, 2019 at 11:20:18AM +0800, Greg Kroah-Hartman wrote:
> > On Tue, Nov 12, 2019 at 09:28:57AM -0600, Bin Liu wrote:
> > > Hi,
> > > 
> > > On Tue, Nov 12, 2019 at 02:51:51PM +0800, Chunfeng Yun wrote:
> > > > 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
> > > 
> > > My opinion is this move is unnecessary. I breaks existing debug tools or
> > > documentation which is already published on Internet. 
> > 
> > Having a "root" directory for a single random driver seems like you are
> > making your driver a "very important" thing in the overall scheme of the
> > kernel, right?  What's wrong with using the usb subdirectory like all
> 
> Agree, it wasn't the right thing to do at the first place. But now
> changing it adds support burden, because people very often refer to the
> old information on the internet which no longer matches to the new
> location. Basically, it is a cost of ABI change.

What information says that /sys/kernel/debug/mdev/ is the location for
this?  Is it in-kernel?

> > other USB drivers use (after this patch series is merged)?  That feels
> > like a much more "sane" way to handle the wide-open debugfs namespace.
> 
> Though I commented on this musb patch, my opinion is for this whole
> series, either drop the whole series or apply the whole series.

I've applied all but this one and 2 others that did not build properly.

> > Yes, there are no rules when it comes to debugfs file names and
> > locations, but let's try to be sane please.
> 
> Fine with me. I can still support questions such as "can't open
> /sys/kernel/debug/musb-hdrc.0/testmode: No such file or directory".

What tool looks for that?

thanks,

greg k-h

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

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

* Re: [PATCH v2 05/13] usb: musb: create debugfs directory under usb root
  2019-11-15  3:21         ` Greg Kroah-Hartman
@ 2019-11-15 13:45           ` Bin Liu
  0 siblings, 0 replies; 20+ messages in thread
From: Bin Liu @ 2019-11-15 13:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  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, linux-arm-kernel,
	Biju Das, Felipe Balbi, Yoshihiro Shimoda, linux-usb,
	Nicolas Ferre, Pengutronix Kernel Team, Colin Ian King,
	Shawn Guo, Daniel Mack

On Fri, Nov 15, 2019 at 11:21:53AM +0800, Greg Kroah-Hartman wrote:
> On Thu, Nov 14, 2019 at 08:02:34AM -0600, Bin Liu wrote:
> > On Thu, Nov 14, 2019 at 11:20:18AM +0800, Greg Kroah-Hartman wrote:
> > > On Tue, Nov 12, 2019 at 09:28:57AM -0600, Bin Liu wrote:
> > > > Hi,
> > > > 
> > > > On Tue, Nov 12, 2019 at 02:51:51PM +0800, Chunfeng Yun wrote:
> > > > > 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
> > > > 
> > > > My opinion is this move is unnecessary. I breaks existing debug tools or
> > > > documentation which is already published on Internet. 
> > > 
> > > Having a "root" directory for a single random driver seems like you are
> > > making your driver a "very important" thing in the overall scheme of the
> > > kernel, right?  What's wrong with using the usb subdirectory like all
> > 
> > Agree, it wasn't the right thing to do at the first place. But now
> > changing it adds support burden, because people very often refer to the
> > old information on the internet which no longer matches to the new
> > location. Basically, it is a cost of ABI change.
> 
> What information says that /sys/kernel/debug/mdev/ is the location for
> this?  Is it in-kernel?

No, they are not in-kernel, but many places mainly on https://e2e.ti.com
and http://processors.wiki.ti.com. It basically says to get musb
regdump, cat /sys/kernel/debug/musb-hdrc.{0,1}/regdump, or to enter test
mode, do echo _testmode_ > /sys/kernel/debug/musb-hdrc.{0,1}/testmode...

> > > other USB drivers use (after this patch series is merged)?  That feels
> > > like a much more "sane" way to handle the wide-open debugfs namespace.
> > 
> > Though I commented on this musb patch, my opinion is for this whole
> > series, either drop the whole series or apply the whole series.
> 
> I've applied all but this one and 2 others that did not build properly.

Okay.

> > > Yes, there are no rules when it comes to debugfs file names and
> > > locations, but let's try to be sane please.
> > 
> > Fine with me. I can still support questions such as "can't open
> > /sys/kernel/debug/musb-hdrc.0/testmode: No such file or directory".
> 
> What tool looks for that?

I wrote a usb diagnosis tool called chkusb.sh, which basically checks
usb related information in
  - /proc/config.gz
  - /lib/modules/`uname -r`/kernel/drivers/
  - /proc/device-tree/
  - /sys/device/
  - /sys/kernel/debug/

So whenever I got a report on e2e.ti.com saying that usb doesn't work, I
just post this script and get a log which would give a clue if there was
any fundamental mistake in kernel configuration or deployment.

But not a big issue here for this tool regarding this patch set, I can
update the script to check both locations - /sys/kernel/debug/ and
/sys/kernel/debug/usb/.

-Bin.

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

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

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

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12  6:51 [PATCH v2 01/13] media: uvcvideo: drop error check of debugfs_create_dir() Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 02/13] usb: chipidea: debug: create debugfs directory under usb root Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 03/13] usb: host: imx21: " Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 04/13] usb: dwc3: " Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 05/13] usb: musb: " Chunfeng Yun
2019-11-12 15:28   ` Bin Liu
2019-11-14  3:20     ` Greg Kroah-Hartman
2019-11-14 14:02       ` Bin Liu
2019-11-15  3:21         ` Greg Kroah-Hartman
2019-11-15 13:45           ` Bin Liu
2019-11-12  6:51 ` [PATCH v2 06/13] usb: musb: dsps: " Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 07/13] usb: dwc2: " Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 08/13] usb: gadget: bcm63xx_udc: " Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 09/13] usb: gadget: atmel: " Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 10/13] usb: gadget: udc: renesas_usb3: " Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 11/13] usb: gadget: pxa27x: " Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 12/13] usb: gadget: udc: gr_udc: " Chunfeng Yun
2019-11-14  3:21   ` Greg Kroah-Hartman
2019-11-14  8:24     ` Chunfeng Yun
2019-11-12  6:51 ` [PATCH v2 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).