Skip to contentSkip to conversation

usb: gadget: configfs: log function unbinding as information

PATCH Superseded Romain Izard 2 participants 7 messages Jul 26, 2016 – Sep 7, 2016 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: configfs: log function unbinding as information

Disabling USB gadget functions configured through configfs is something that can happen in normal use cases. Keep the existing log for this type of event, but only as information, not as an error.

---
 drivers/usb/gadget/configfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/usb/gadget/configfs.c +3 -2
index 70cf3477f951..11f3a649d9e5 100644
@@ -1211,8 +1211,9 @@ static void purge_configs_funcs(struct gadget_info *gi)
 
 			list_move_tail(&f->list, &cfg->func_list);
 			if (f->unbind) {
-				dev_err(&gi->cdev.gadget->dev, "unbind function"
-						" '%s'/%p\n", f->name, f);
+				dev_info(&gi->cdev.gadget->dev,
+				         "unbind function '%s'/%p\n",
+				         f->name, f);
 				f->unbind(c, f);
 			}
 		}
Signature · 1 line
2.7.4
#1 lore raw

2016-07-26 18:21 GMT+02:00 Romain Izard <[email protected]>:

Quoted 26 lines

Disabling USB gadget functions configured through configfs is something that can happen in normal use cases. Keep the existing log for this type of event, but only as information, not as an error.

---
 drivers/usb/gadget/configfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/usb/gadget/configfs.c +3 -3
index 70cf3477f951..11f3a649d9e5 100644
@@ -1211,8 +1211,9 @@ static void purge_configs_funcs(struct gadget_info *gi)
 
                        list_move_tail(&f->list, &cfg->func_list);
                        if (f->unbind) {
-                               dev_err(&gi->cdev.gadget->dev, "unbind function"
-                                               " '%s'/%p\n", f->name, f);
+                               dev_info(&gi->cdev.gadget->dev,
+                                        "unbind function '%s'/%p\n",
+                                        f->name, f);
                                f->unbind(c, f);
                        }
                }
--
Quoted 2 lines

2.7.4

Ping ?

#2 lore raw
In reply to Romain Izard

Hi,

Quoted 14 lines · Romain Izard

Disabling USB gadget functions configured through configfs is something that can happen in normal use cases. Keep the existing log for this type of event, but only as information, not as an error.

---
 drivers/usb/gadget/configfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/usb/gadget/configfs.c +0 -0
index 70cf3477f951..11f3a649d9e5 100644

drivers/usb/gadget/configfs.c static void purge_configs_funcs(struct gadget_info *gi) · line 1214

Quoted 6 lines
drivers/usb/gadget/configfs.c +1 -2
@@ -1211,8 +1211,9 @@ static void purge_configs_funcs(struct gadget_info *gi)
 
 			list_move_tail(&f->list, &cfg->func_list);
 			if (f->unbind) {
-				dev_err(&gi->cdev.gadget->dev, "unbind function"
-						" '%s'/%p\n", f->name, f);
+				dev_info(&gi->cdev.gadget->dev,

seems to me dev_dbg() is a far better alternative. We really don't need this on everybody's log buffer unless they really _are_ debugging some possible issues.

Signature · 1 line
balbi
#3 lore raw

2016-08-29 10:13 GMT+02:00 Felipe Balbi <[email protected]>:

Quoted 19 lines

Hi,

Quoted 15 lines · Romain Izard

Disabling USB gadget functions configured through configfs is something that can happen in normal use cases. Keep the existing log for this type of event, but only as information, not as an error.

---
 drivers/usb/gadget/configfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/usb/gadget/configfs.c +0 -0
index 70cf3477f951..11f3a649d9e5 100644
@@ -1211,8 +1211,9 @@ static void purge_configs_funcs(struct gadget_info *gi)
 
Quoted 9 lines

drivers/usb/gadget/configfs.c static void purge_configs_funcs(struct gadget_info *gi) · line 1214

Quoted 5 lines
drivers/usb/gadget/configfs.c +1 -2
                      list_move_tail(&f->list, &cfg->func_list);
                      if (f->unbind) {
-                             dev_err(&gi->cdev.gadget->dev, "unbind function"
-                                             " '%s'/%p\n", f->name, f);
+                             dev_info(&gi->cdev.gadget->dev,

seems to me dev_dbg() is a far better alternative. We really don't need this on everybody's log buffer unless they really _are_ debugging some possible issues.

OK, I'll send a v2.

Signature · 1 line
Romain Izard
#4 lore raw

PATCH v2 1/1 usb: gadget: configfs: log function unbinding as debug

In reply to Romain Izard

Disabling USB gadget functions configured through configfs is something that can happen in normal use cases. Keep the existing log for this type of event, but only as debug, not as an error.

---
v1 -> v2:
- use dev_dbg instead of dev_info

 drivers/usb/gadget/configfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/usb/gadget/configfs.c +3 -2
index f9237fe2be05..3984787f8e97 100644
@@ -1211,8 +1211,9 @@ static void purge_configs_funcs(struct gadget_info *gi)
 
 			list_move_tail(&f->list, &cfg->func_list);
 			if (f->unbind) {
-				dev_err(&gi->cdev.gadget->dev, "unbind function"
-						" '%s'/%p\n", f->name, f);
+				dev_dbg(&gi->cdev.gadget->dev,
+				         "unbind function '%s'/%p\n",
+				         f->name, f);
 				f->unbind(c, f);
 			}
 		}
Signature · 1 line
2.7.4
#5 lore raw

Re: [PATCH v2] usb: gadget: configfs: log function unbinding as debug

2016-08-29 11:07 GMT+02:00 Romain Izard <[email protected]>:

Quoted 29 lines

Disabling USB gadget functions configured through configfs is something that can happen in normal use cases. Keep the existing log for this type of event, but only as debug, not as an error.

---
v1 -> v2:
- use dev_dbg instead of dev_info

 drivers/usb/gadget/configfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/usb/gadget/configfs.c +3 -3
index f9237fe2be05..3984787f8e97 100644
@@ -1211,8 +1211,9 @@ static void purge_configs_funcs(struct gadget_info *gi)
 
                        list_move_tail(&f->list, &cfg->func_list);
                        if (f->unbind) {
-                               dev_err(&gi->cdev.gadget->dev, "unbind function"
-                                               " '%s'/%p\n", f->name, f);
+                               dev_dbg(&gi->cdev.gadget->dev,
+                                        "unbind function '%s'/%p\n",
+                                        f->name, f);
                                f->unbind(c, f);
                        }
                }
--
Quoted 2 lines

2.7.4

Ping ?

#6 lore raw

Re: [PATCH v2] usb: gadget: configfs: log function unbinding as debug

Quoted 19 lines · Romain Izard

2016-08-29 11:07 GMT+02:00 Romain Izard <[email protected]>:

Quoted 18 lines

Disabling USB gadget functions configured through configfs is something that can happen in normal use cases. Keep the existing log for this type of event, but only as debug, not as an error.

---
v1 -> v2:
- use dev_dbg instead of dev_info

 drivers/usb/gadget/configfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/usb/gadget/configfs.c +0 -0
index f9237fe2be05..3984787f8e97 100644
@@ -1211,8 +1211,9 @@ static void purge_configs_funcs(struct gadget_info *gi)
 
Quoted 15 lines
Quoted 11 lines
drivers/usb/gadget/configfs.c +3 -3
                        list_move_tail(&f->list, &cfg->func_list);
                        if (f->unbind) {
-                               dev_err(&gi->cdev.gadget->dev, "unbind function"
-                                               " '%s'/%p\n", f->name, f);
+                               dev_dbg(&gi->cdev.gadget->dev,
+                                        "unbind function '%s'/%p\n",
+                                        f->name, f);
                                f->unbind(c, f);
                        }
                }
--
Quoted 2 lines

2.7.4

Ping ?

https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/commit/?h=testing/next&id=da7b895d518cc1753ee5f4b7f2158087282d1a65

Signature · 1 line
balbi