Skip to contentSkip to conversation

usb: dwc3: trace: log ep commands in hex

PATCH New Laurent Pinchart 1 participant 1 message Aug 20, 2018 USB

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 usb: dwc3: trace: log ep commands in hex

Hi Felipe,

Thank you for the patch.

Quoted 13 lines · On Monday, 20 August 2018 13:30:00 EEST Felipe Balbi wrote:

They are much more useful in hexadecimal than in decimal. Moreover, generic commands are already logged in hex.

---
 drivers/usb/dwc3/trace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/trace.h +0 -0
index f22714cce070..50fb6f2d92dd 100644

drivers/usb/dwc3/trace.h DECLARE_EVENT_CLASS(dwc3_log_gadget_ep_cmd, · line 202

Quoted 5 lines
drivers/usb/dwc3/trace.h +1 -1
@@ -199,7 +199,7 @@ DECLARE_EVENT_CLASS(dwc3_log_gadget_ep_cmd,
 		__entry->param2 = params->param2;
 		__entry->cmd_status = cmd_status;
 	),
-	TP_printk("%s: cmd '%s' [%d] params %08x %08x %08x --> status: %s",
+	TP_printk("%s: cmd '%s' [%x] params %08x %08x %08x --> status: %s",

How about 0x%x ? Otherwise one could get confused when the command representation in hex doesn't contain a letter (especially given that this patch transitions from decimal to hexadecimal).

Quoted 3 lines
drivers/usb/dwc3/trace.h +0 -0
 		__get_str(name), dwc3_gadget_ep_cmd_string(__entry->cmd),
 		__entry->cmd, __entry->param0,
 		__entry->param1, __entry->param2,