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]

 



Hi,

David Laight <David.Laight@xxxxxxxxxx> writes:
> 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??

I could, *but* I'm assuming the buffer to be large enough.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux