Skip to contentSkip to conversation

usb: gadget: rndis: use %u instead of %d to print u32 values

PATCH In review Ray Hung 2 participants 3 messages Aug 4, 2022 USB

lore
Share & tools
lore

Ray Hung

author
#0 lore raw

PATCH 1/1 usb: gadget: rndis: use %u instead of %d to print u32 values

The driver uses the %d format to print u32 values. The correct format is %u. Fix it.

---
 drivers/usb/gadget/function/rndis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/rndis.c +1 -1
index 713efd9aefde..10ba339bcea4 100644
@@ -1105,7 +1105,7 @@ static int rndis_proc_show(struct seq_file *m, void *v)
 			 "used      : %s\n"
 			 "state     : %s\n"
 			 "medium    : 0x%08X\n"
-			 "speed     : %d\n"
+			 "speed     : %u\n"
 			 "cable     : %s\n"
 			 "vendor ID : 0x%08X\n"
 			 "vendor    : %s\n",
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 24 lines · Ray Hung

The driver uses the %d format to print u32 values. The correct format is %u. Fix it.

---
 drivers/usb/gadget/function/rndis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/rndis.c +1 -1
index 713efd9aefde..10ba339bcea4 100644
@@ -1105,7 +1105,7 @@ static int rndis_proc_show(struct seq_file *m, void *v)
 			 "used      : %s\n"
 			 "state     : %s\n"
 			 "medium    : 0x%08X\n"
-			 "speed     : %d\n"
+			 "speed     : %u\n"
 			 "cable     : %s\n"
 			 "vendor ID : 0x%08X\n"
 			 "vendor    : %s\n",
Signature · 1 line
2.25.1

What commit id does this fix?

And given this is only for debugging, there's no rush, right?

thanks,

greg k-h

author
#2 lore raw

Hi,

What commit id does this fix?

Quoted 1 line

It's 1da177e4c3f4

And given this is only for debugging, there's no rush, right?

Quoted 1 line

Yes, only for debugging

Thanks!

Ray

Greg KH <[email protected]> 於 2022年8月4日 週四 晚上7:25寫道:

Quoted 34 lines · Ray Hung
Quoted 22 lines

The driver uses the %d format to print u32 values. The correct format is %u. Fix it.

---
 drivers/usb/gadget/function/rndis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/rndis.c +1 -2
index 713efd9aefde..10ba339bcea4 100644
@@ -1105,7 +1105,7 @@ static int rndis_proc_show(struct seq_file *m, void *v)
                       "used      : %s\n"
                       "state     : %s\n"
                       "medium    : 0x%08X\n"
-                      "speed     : %d\n"
+                      "speed     : %u\n"
                       "cable     : %s\n"
                       "vendor ID : 0x%08X\n"
                       "vendor    : %s\n",
--
Quoted 2 lines

2.25.1

What commit id does this fix?

And given this is only for debugging, there's no rush, right?

thanks,

greg k-h