Commit 27c7ab0f authored by Felipe Balbi's avatar Felipe Balbi

usb: dwc3: debug: fix sparse warning

Fix the following sparse warning:

drivers/usb/dwc3/trace.c: note: in included file (through drivers/usb/dwc3/trace.h):
drivers/usb/dwc3/debug.h:374:39: warning: cast to non-scalar
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent a793cf81
......@@ -371,7 +371,9 @@ static inline const char *dwc3_gadget_event_type_string(u8 event)
static inline const char *dwc3_decode_event(char *str, size_t size, u32 event,
u32 ep0state)
{
const union dwc3_event evt = (union dwc3_event) event;
union dwc3_event evt;
memcpy(&evt, &event, sizeof(event));
if (evt.type.is_devspec)
return dwc3_gadget_event_string(str, size, &evt.devt);
......
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