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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 20, 2018 at 3:21 PM Laurent Pinchart
<laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
>
> Hi Andy,
>
> On Monday, 20 August 2018 15:06:31 EEST Andy Shevchenko wrote:
> > On Mon, Aug 20, 2018 at 2:25 PM, Laurent Pinchart wrote:
> > >> -     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 ?
> >
> > 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.

       #      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.


-- 
With Best Regards,
Andy Shevchenko




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux