Commit 7790b355 authored by Felipe Balbi's avatar Felipe Balbi

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: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 3aec9915
This diff is collapsed.
...@@ -59,8 +59,8 @@ DECLARE_EVENT_CLASS(dwc3_log_event, ...@@ -59,8 +59,8 @@ DECLARE_EVENT_CLASS(dwc3_log_event,
__entry->ep0state = dwc->ep0state; __entry->ep0state = dwc->ep0state;
), ),
TP_printk("event (%08x): %s", __entry->event, TP_printk("event (%08x): %s", __entry->event,
dwc3_decode_event(__get_str(str), __entry->event, dwc3_decode_event(__get_str(str), DWC3_MSG_MAX,
__entry->ep0state)) __entry->event, __entry->ep0state))
); );
DEFINE_EVENT(dwc3_log_event, dwc3_event, DEFINE_EVENT(dwc3_log_event, dwc3_event,
...@@ -86,7 +86,8 @@ DECLARE_EVENT_CLASS(dwc3_log_ctrl, ...@@ -86,7 +86,8 @@ DECLARE_EVENT_CLASS(dwc3_log_ctrl,
__entry->wIndex = le16_to_cpu(ctrl->wIndex); __entry->wIndex = le16_to_cpu(ctrl->wIndex);
__entry->wLength = le16_to_cpu(ctrl->wLength); __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->bRequest, __entry->wValue,
__entry->wIndex, __entry->wLength) __entry->wIndex, __entry->wLength)
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment