RE: [PATCH 5/7] usb: dwc3: debug: remove static char buffer from dwc3_decode_event()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Felipe Balbi
> Sent: 09 May 2017 08:07
> Instead, we can require caller to pass a buffer for the function to
> use. This cleans things quite a bit.
...
> -dwc3_gadget_event_string(const struct dwc3_event_devt *event)
> +dwc3_gadget_event_string(char *str, const struct dwc3_event_devt *event)
>  {
> -	static char str[256];
>  	enum dwc3_link_state state = event->event_info & DWC3_LINK_STATE_MASK;

Should you also pass in the size??

	David

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux