usb: dwc3: debug: remove static char buffer from dwc3_decode_event()

Instead, we can require caller to pass a buffer for the function to
use. This cleans things quite a bit.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
Felipe Balbi 2017-04-28 11:28:35 +03:00
parent e42f09b85f
commit 3587f36a12
2 changed files with 9 additions and 8 deletions

View file

@ -60,13 +60,15 @@ DECLARE_EVENT_CLASS(dwc3_log_event,
TP_STRUCT__entry(
__field(u32, event)
__field(u32, ep0state)
__dynamic_array(char, str, DWC3_MSG_MAX)
),
TP_fast_assign(
__entry->event = event;
__entry->ep0state = dwc->ep0state;
),
TP_printk("event (%08x): %s", __entry->event,
dwc3_decode_event(__entry->event, __entry->ep0state))
dwc3_decode_event(__get_str(str), __entry->event,
__entry->ep0state))
);
DEFINE_EVENT(dwc3_log_event, dwc3_event,