Skip to contentSkip to conversation

usb: dwc3: trace: log ep commands in hex

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

lore
Share & tools
lore
#0 lore raw

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

Hi Andy,

Quoted 16 lines · On Thursday, 23 August 2018 12:57:57 EEST Andy Shevchenko wrote:
Quoted 7 lines · Laurent Pinchart
Quoted 6 lines · On Monday, 20 August 2018 15:06:31 EEST Andy Shevchenko wrote:
Quoted 5 lines · Laurent Pinchart
Quoted 4 lines

- TP_printk("%s: cmd '%s' [%d] params %08x %08x %08x --> status:
%s",
+ TP_printk("%s: cmd '%s' [%x] params %08x %08x %08x --> status:
%s",

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

How about 0x%x ?

Side note: # is one character less for the same.

Doesn't that print 0 instead of 0x0 ? There's no ambiguity with 0, but I find that always printing the 0x is more consistent. I'll leave that up to Felipe, I'm OK with both options.

Quoted 6 lines

# The value should be converted to an "alternate form".
For o conversions, the first character of
the output string is made zero (by prefixing a 0 if it
was not zero already). For x and X con‐

             versions, a nonzero result has the string "0x" (or "0X"

for X conversions) prepended to it.

That's exactly my point, it will only prepend 0x when the value is not zero. Small inconsistency, but I don't mind too much.