From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Pawel Laszczak <pawell@cadence.com>
Cc: linux-usb@vger.kernel.org, Felipe Balbi <balbi@kernel.org>,
linux-kernel@vger.kernel.org, ltyrala@cadence.com,
adouglas@cadence.com
Subject: [02/31] usb: usbssp: Added some decoding functions.
Date: Mon, 10 Sep 2018 20:18:56 +0200 [thread overview]
Message-ID: <20180910181856.GB6019@kroah.com> (raw)
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...
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Pawel Laszczak <pawell@cadence.com>
Cc: linux-usb@vger.kernel.org, Felipe Balbi <balbi@kernel.org>,
linux-kernel@vger.kernel.org, ltyrala@cadence.com,
adouglas@cadence.com
Subject: Re: [PATCH 02/31] usb: usbssp: Added some decoding functions.
Date: Mon, 10 Sep 2018 20:18:56 +0200 [thread overview]
Message-ID: <20180910181856.GB6019@kroah.com> (raw)
In-Reply-To: <1532023084-28083-3-git-send-email-pawell@cadence.com>
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...
thanks,
greg k-h
next reply other threads:[~2018-09-10 18:18 UTC|newest]
Thread overview: 107+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 18:18 Greg Kroah-Hartman [this message]
2018-09-10 18:18 ` [PATCH 02/31] usb: usbssp: Added some decoding functions Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2018-09-11 9:01 [02/31] " Pawel Laszczak
2018-09-11 9:01 ` [PATCH 02/31] " Pawel Laszczak
2018-09-11 8:12 [02/31] " Greg Kroah-Hartman
2018-09-11 8:12 ` [PATCH 02/31] " Greg Kroah-Hartman
2018-09-11 5:48 [02/31] " Felipe Balbi
2018-09-11 5:48 ` [PATCH 02/31] " Felipe Balbi
2018-08-06 12:03 [05/31] usb: usbssp: Added first part of initialization sequence Pawel Laszczak
2018-08-06 12:03 ` [PATCH 05/31] " Pawel Laszczak
2018-08-06 11:40 [06/31] usb: usbssp: added template functions used by upper layer Pawel Laszczak
2018-08-06 11:40 ` [PATCH 06/31] " Pawel Laszczak
2018-08-06 10:33 [05/31] usb: usbssp: Added first part of initialization sequence Roger Quadros
2018-08-06 10:33 ` [PATCH 05/31] " Roger Quadros
2018-08-06 8:57 [05/31] " Pawel Laszczak
2018-08-06 8:57 ` [PATCH 05/31] " Pawel Laszczak
2018-08-06 8:57 [06/31] usb: usbssp: added template functions used by upper layer Roger Quadros
2018-08-06 8:57 ` [PATCH 06/31] " Roger Quadros
2018-08-04 6:37 [06/31] " Pawel Laszczak
2018-08-04 6:37 ` [PATCH 06/31] " Pawel Laszczak
2018-08-03 10:42 [06/31] " Roger Quadros
2018-08-03 10:42 ` [PATCH 06/31] " Roger Quadros
2018-08-03 10:17 [05/31] usb: usbssp: Added first part of initialization sequence Roger Quadros
2018-08-03 10:17 ` [PATCH 05/31] " Roger Quadros
2018-08-02 13:28 [04/31] usb: usbssp: Added USBSSP platform driver Roger Quadros
2018-08-02 13:28 ` [PATCH 04/31] " Roger Quadros
2018-08-02 6:25 [04/31] " Pawel Laszczak
2018-08-02 6:25 ` [PATCH 04/31] " Pawel Laszczak
2018-08-01 12:24 [04/31] " Roger Quadros
2018-08-01 12:24 ` [PATCH 04/31] " Roger Quadros
2018-07-19 17:58 [31/31] usb: usbssp: add pci to platform driver wrapper Pawel Laszczak
2018-07-19 17:58 ` [PATCH 31/31] " Pawel Laszczak
2018-07-19 17:58 [30/31] usb: usbssp: added support for TEST_MODE Pawel Laszczak
2018-07-19 17:58 ` [PATCH 30/31] " Pawel Laszczak
2018-07-19 17:58 [29/31] usb: usbssp: added support for LPM Pawel Laszczak
2018-07-19 17:58 ` [PATCH 29/31] " Pawel Laszczak
2018-07-19 17:58 [28/31] usb: usbssp: implemented usbssp_gadget_ep_disable function Pawel Laszczak
2018-07-19 17:58 ` [PATCH 28/31] " Pawel Laszczak
2018-07-19 17:58 [27/31] usb: usbssp: implements usbssp_gadget_ep_enable function Pawel Laszczak
2018-07-19 17:58 ` [PATCH 27/31] " Pawel Laszczak
2018-07-19 17:57 [26/31] usb: usbssp: added endpoint configuration functionality Pawel Laszczak
2018-07-19 17:57 ` [PATCH 26/31] " Pawel Laszczak
2018-07-19 17:57 [25/31] usb: usbssp: added implementation of usbssp interface Pawel Laszczak
2018-07-19 17:57 ` [PATCH 25/31] " Pawel Laszczak
2018-07-19 17:57 [24/31] usb: usbssp: added detecting command timeout Pawel Laszczak
2018-07-19 17:57 ` [PATCH 24/31] " Pawel Laszczak
2018-07-19 17:57 [23/31] usb: usbssp: added implementation of transfer events Pawel Laszczak
2018-07-19 17:57 ` [PATCH 23/31] " Pawel Laszczak
2018-07-19 17:57 [22/31] usb: usbssp: added procedure removing request from transfer ring Pawel Laszczak
2018-07-19 17:57 ` [PATCH 22/31] " Pawel Laszczak
2018-07-19 17:57 [21/31] usb: usbssp: added queuing procedure for BULK and INT transfer Pawel Laszczak
2018-07-19 17:57 ` [PATCH 21/31] " Pawel Laszczak
2018-07-19 17:57 [20/31] usb: usbssp: added queuing procedure for control transfer Pawel Laszczak
2018-07-19 17:57 ` [PATCH 20/31] " Pawel Laszczak
2018-07-19 17:57 [19/31] usb: usbssp: added support for USB enumeration process Pawel Laszczak
2018-07-19 17:57 ` [PATCH 19/31] " Pawel Laszczak
2018-07-19 17:57 [18/31] usb: usbssp: added handling of Port Reset event Pawel Laszczak
2018-07-19 17:57 ` [PATCH 18/31] " Pawel Laszczak
2018-07-19 17:57 [17/31] usb: usbssp: added implementation of usbssp_halt_endpoint function Pawel Laszczak
2018-07-19 17:57 ` [PATCH 17/31] " Pawel Laszczak
2018-07-19 17:57 [16/31] usb: usbssp: added connect/disconnect procedures Pawel Laszczak
2018-07-19 17:57 ` [PATCH 16/31] " Pawel Laszczak
2018-07-19 17:57 [15/31] usb: usbssp: added device controller error, transfer and SETUP completion event Pawel Laszczak
2018-07-19 17:57 ` [PATCH 15/31] " Pawel Laszczak
2018-07-19 17:57 [14/31] usb: usbssp: added procedure handling command completion events Pawel Laszczak
2018-07-19 17:57 ` [PATCH 14/31] " Pawel Laszczak
2018-07-19 17:57 [13/31] usb: usbssp: addec procedure for handlin Port Status Change events Pawel Laszczak
2018-07-19 17:57 ` [PATCH 13/31] " Pawel Laszczak
2018-07-19 17:57 [12/31] usb: usbssp: added functions for queuing commands Pawel Laszczak
2018-07-19 17:57 ` [PATCH 12/31] " Pawel Laszczak
2018-07-19 17:57 [11/31] usb: usbssp: added function for stopping driver Pawel Laszczak
2018-07-19 17:57 ` [PATCH 11/31] " Pawel Laszczak
2018-07-19 17:57 [10/31] usb: usbssp: added usbssp_trb_in_td function Pawel Laszczak
2018-07-19 17:57 ` [PATCH 10/31] " Pawel Laszczak
2018-07-19 17:57 [09/31] usb: usbssp: add implementation of usbssp_mem_cleanup Pawel Laszczak
2018-07-19 17:57 ` [PATCH 09/31] " Pawel Laszczak
2018-07-19 17:57 [08/31] usb: usbssp: Added ring and segment handling functions Pawel Laszczak
2018-07-19 17:57 ` [PATCH 08/31] " Pawel Laszczak
2018-07-19 17:57 [07/31] usb: usbssp: Initialization - added usbssp_mem_init Pawel Laszczak
2018-07-19 17:57 ` [PATCH 07/31] " Pawel Laszczak
2018-07-19 17:57 [06/31] usb: usbssp: added template functions used by upper layer Pawel Laszczak
2018-07-19 17:57 ` [PATCH 06/31] " Pawel Laszczak
2018-07-19 17:57 [05/31] usb: usbssp: Added first part of initialization sequence Pawel Laszczak
2018-07-19 17:57 ` [PATCH 05/31] " Pawel Laszczak
2018-07-19 17:57 [04/31] usb: usbssp: Added USBSSP platform driver Pawel Laszczak
2018-07-19 17:57 ` [PATCH 04/31] " Pawel Laszczak
2018-07-19 17:57 [03/31] usb: usbssp: Add trace events used in driver Pawel Laszczak
2018-07-19 17:57 ` [PATCH 03/31] " Pawel Laszczak
2018-07-19 17:57 [02/31] usb: usbssp: Added some decoding functions Pawel Laszczak
2018-07-19 17:57 ` [PATCH 02/31] " Pawel Laszczak
2018-07-19 17:57 [01/31] usb: usbssp: Defined register maps and other useful structures Pawel Laszczak
2018-07-19 17:57 ` [PATCH 01/31] " Pawel Laszczak
2018-07-19 17:57 [PATCH 00/31] Introduced new Cadence USBSSP DRD Driver Pawel Laszczak
2018-08-01 11:27 ` Roger Quadros
2018-08-02 4:26 ` Pawel Laszczak
2018-08-02 13:24 ` Roger Quadros
2018-09-10 18:21 ` Greg Kroah-Hartman
2018-08-17 21:05 ` Bin Liu
2018-08-21 14:50 ` Pawel Laszczak
2018-09-10 18:20 ` Greg Kroah-Hartman
2018-09-10 18:16 ` Greg Kroah-Hartman
2018-07-12 17:07 [02/31] usb: usbssp: Added some decoding functions Greg Kroah-Hartman
2018-07-12 16:43 Pawel Laszczak
2018-07-12 6:35 Greg Kroah-Hartman
2018-07-12 6:28 Pawel Laszczak
2018-07-12 6:10 Greg Kroah-Hartman
2018-07-12 5:46 Pawel Laszczak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180910181856.GB6019@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=adouglas@cadence.com \
--cc=balbi@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ltyrala@cadence.com \
--cc=pawell@cadence.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.