diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-02-04 14:43:38 +0100 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-02-04 14:43:38 +0100 |
commit | 7790b3556fccc555ae422f1576e97bf34c8ab8b6 (patch) | |
tree | 1f7c4c8dfe1ef22b0666c57bcc108c3eece71232 /drivers/usb/dwc3/trace.h | |
parent | usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING (diff) | |
download | linux-7790b3556fccc555ae422f1576e97bf34c8ab8b6.tar.xz linux-7790b3556fccc555ae422f1576e97bf34c8ab8b6.zip |
usb: dwc3: trace: pass trace buffer size to decoding functions
Instead of assuming that our buffer is big enough, let's pass the
buffer size around so printing functions can make sure they won't
overflow the buffer.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/trace.h')
-rw-r--r-- | drivers/usb/dwc3/trace.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h index 3a2f2c319c9a..818a63da1a44 100644 --- a/drivers/usb/dwc3/trace.h +++ b/drivers/usb/dwc3/trace.h @@ -59,8 +59,8 @@ DECLARE_EVENT_CLASS(dwc3_log_event, __entry->ep0state = dwc->ep0state; ), TP_printk("event (%08x): %s", __entry->event, - dwc3_decode_event(__get_str(str), __entry->event, - __entry->ep0state)) + dwc3_decode_event(__get_str(str), DWC3_MSG_MAX, + __entry->event, __entry->ep0state)) ); DEFINE_EVENT(dwc3_log_event, dwc3_event, @@ -86,7 +86,8 @@ DECLARE_EVENT_CLASS(dwc3_log_ctrl, __entry->wIndex = le16_to_cpu(ctrl->wIndex); __entry->wLength = le16_to_cpu(ctrl->wLength); ), - TP_printk("%s", dwc3_decode_ctrl(__get_str(str), __entry->bRequestType, + TP_printk("%s", dwc3_decode_ctrl(__get_str(str), DWC3_MSG_MAX, + __entry->bRequestType, __entry->bRequest, __entry->wValue, __entry->wIndex, __entry->wLength) ) |