usb: chipidea: trace: fix the endian issue

"sparse warnings: (new ones prefixed by >>)"
   drivers/usb/chipidea/trace.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, drivers/usb/chipidea/trace.h):
>> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] next @@     got restricted __le32 [usertype] next @@
>> drivers/usb/chipidea/./trace.h:39:1: sparse:     expected unsigned int [usertype] next
>> drivers/usb/chipidea/./trace.h:39:1: sparse:     got restricted __le32 [usertype] next
>> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] token @@     got restricted __le32 [usertype] token @@
>> drivers/usb/chipidea/./trace.h:39:1: sparse:     expected unsigned int [usertype] token
>> drivers/usb/chipidea/./trace.h:39:1: sparse:     got restricted __le32 [usertype] token
   drivers/usb/chipidea/trace.c: note: in included file (through include/trace/perf.h, include/trace/define_trace.h, drivers/usb/chipidea/trace.h):
>> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] next @@     got restricted __le32 [usertype] next @@
>> drivers/usb/chipidea/./trace.h:39:1: sparse:     expected unsigned int [usertype] next
>> drivers/usb/chipidea/./trace.h:39:1: sparse:     got restricted __le32 [usertype] next
>> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] token @@     got restricted __le32 [usertype] token @@
>> drivers/usb/chipidea/./trace.h:39:1: sparse:     expected unsigned int [usertype] token
>> drivers/usb/chipidea/./trace.h:39:1: sparse:     got restricted __le32 [usertype] token

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
This commit is contained in:
Peter Chen 2020-11-13 15:39:22 +08:00
parent b4c5d446a6
commit 429ad75f2b
No known key found for this signature in database
GPG key ID: 4859298150D671BB

View file

@ -56,8 +56,8 @@ DECLARE_EVENT_CLASS(ci_log_trb,
__entry->td = td;
__entry->dma = td->dma;
__entry->td_remaining_size = td->td_remaining_size;
__entry->next = td->ptr->next;
__entry->token = td->ptr->token;
__entry->next = le32_to_cpu(td->ptr->next);
__entry->token = le32_to_cpu(td->ptr->token);
__entry->type = usb_endpoint_type(hwep->ep.desc);
),
TP_printk("%s: req: %p, td: %p, td_dma_address: %pad, remaining_size: %d, "