lkml.org 
[lkml]   [2019]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v9 2/6] usb:gadget Separated decoding functions from dwc3 driver.
Date
Hi,

>
>Roger Quadros <rogerq@ti.com> writes:
>>>>> +extern const char *usb_decode_ctrl(char *str, size_t size, __u8 bRequestType,
>>>>> + __u8 bRequest, __u16 wValue, __u16 wIndex,
>>>>> + __u16 wLength);
>>>>> +
>>>>
>>>> where's the stub when !TRACING?
>>>
>>> Right, I will add
>>> #ifdef CONFIG_TRACING
>>> .....
>>> #endif
>>
>> Can usb_decode_ctrl() be used even when CONFIG_TRACING is not set?
>> If yes then above #ifdefe is not sufficient.
>>
>> You might need to do something like
>>
>> #if defined(CONFIG_TRACING)
>>
>> extern const char *usb_decode_ctrl(..)
>>
>> #else
>>
>> static inline const char *usb_decode_ctrl(..) {
>> return NULL;
>> }
>>
>> #endif
>
>This is what I mean. They shouldn't be used outside of TRACING, but it's
>far safer to have the stubs.

usb-common-$(CONFIG_TRACING) += debug.o
has been added in Makefile so we don't want to use this if CONFIG_TRACING is not set.

I assume that with this approach this part is correct.

Thanks
Pawell

>
>--
>balbi

\
 
 \ /
  Last update: 2019-08-08 05:10    [W:0.124 / U:2.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site