lkml.org 
[lkml]   [2018]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 02/31] usb: usbssp: Added some decoding functions.
Date

Hi,

Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> On Thu, Jul 19, 2018 at 06:57:35PM +0100, Pawel Laszczak wrote:
>> This patch add additional functions that converts some fields to string.
>>
>> For example function usbssp_trb_comp_code_string take completion
>> code value and return string describing completion code.
>>
>> Signed-off-by: Pawel Laszczak <pawell@cadence.com>
>> ---
>> drivers/usb/usbssp/gadget.h | 580 ++++++++++++++++++++++++++++++++++++
>> 1 file changed, 580 insertions(+)
>>
>> diff --git a/drivers/usb/usbssp/gadget.h b/drivers/usb/usbssp/gadget.h
>> index 49e7271187cc..b5c17603af78 100644
>> --- a/drivers/usb/usbssp/gadget.h
>> +++ b/drivers/usb/usbssp/gadget.h
>> @@ -930,6 +930,73 @@ struct usbssp_transfer_event {
>> #define COMP_UNDEFINED_ERROR 33
>> #define COMP_INVALID_STREAM_ID_ERROR 34
>>
>> +static inline const char *usbssp_trb_comp_code_string(u8 status)
>
> <snip>
>
>
> You have _giant_ inline functions here, why?
>
> Please just put this all in a .c file and let the linker properly handle
> things. You do not want to duplicate all of these crazy strings all
> over the place where ever you call these functions.
>
> And I am guessing this is only for some sort of "debugging" mode? If
> so, shouldn't there be a way to not even build this in? Some systems
> are very space constrained...

many of them seem to be a straight copy from xhci.

--
balbi

\
 
 \ /
  Last update: 2018-09-11 07:50    [W:0.157 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site