[1/4] usb: dwc3: move all string helper functions to debug.h

Message ID 1409928986-8690-1-git-send-email-balbi@ti.com
State Accepted
Commit 80977dc99be5d874d10716594e716ef317c1723c
Headers show

Commit Message

Felipe Balbi Sept. 5, 2014, 2:56 p.m.
Those functions are only using within debugging
messages, grouping them into debug.h makes sense.

While at that, also add missing multiple inclusion
guard.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/dwc3/debug.h  | 164 +++++++++++++++++++++++++++++++++++++++++++++-
 drivers/usb/dwc3/ep0.c    |   1 +
 drivers/usb/dwc3/gadget.c |  89 +------------------------
 drivers/usb/dwc3/gadget.h |  56 ----------------
 4 files changed, 165 insertions(+), 145 deletions(-)

Comments

Paul Zimmerman Sept. 5, 2014, 6:23 p.m. | #1
> From: Felipe Balbi [mailto:balbi@ti.com]
> Sent: Friday, September 05, 2014 7:56 AM
> 
> Those functions are only using within debugging
> messages, grouping them into debug.h makes sense.
> 
> While at that, also add missing multiple inclusion
> guard.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  drivers/usb/dwc3/debug.h  | 164 +++++++++++++++++++++++++++++++++++++++++++++-
>  drivers/usb/dwc3/ep0.c    |   1 +
>  drivers/usb/dwc3/gadget.c |  89 +------------------------
>  drivers/usb/dwc3/gadget.h |  56 ----------------
>  4 files changed, 165 insertions(+), 145 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h
> index fceb39d..e35a3d1 100644
> --- a/drivers/usb/dwc3/debug.h
> +++ b/drivers/usb/dwc3/debug.h
> @@ -16,8 +16,170 @@
>   * GNU General Public License for more details.
>   */
> 
> +#ifndef __DWC3_DEBUG_H
> +#define __DWC3_DEBUG_H
> +
>  #include "core.h"
> 
> +/**
> + * dwc3_gadget_ep_cmd_string - returns endpoint command string
> + * @cmd: command code
> + */
> +static inline const char *
> +dwc3_gadget_ep_cmd_string(u8 cmd)
> +{
> +	switch (cmd) {
> +	case DWC3_DEPCMD_DEPSTARTCFG:
> +		return "Start New Configuration";
> +	case DWC3_DEPCMD_ENDTRANSFER:
> +		return "End Transfer";
> +	case DWC3_DEPCMD_UPDATETRANSFER:
> +		return "Update Transfer";
> +	case DWC3_DEPCMD_STARTTRANSFER:
> +		return "Start Transfer";
> +	case DWC3_DEPCMD_CLEARSTALL:
> +		return "Clear Stall";
> +	case DWC3_DEPCMD_SETSTALL:
> +		return "Set Stall";
> +	case DWC3_DEPCMD_GETEPSTATE:
> +		return "Get Endpoint State";
> +	case DWC3_DEPCMD_SETTRANSFRESOURCE:
> +		return "Set Endpoint Transfer Resource";
> +	case DWC3_DEPCMD_SETEPCONFIG:
> +		return "Set Endpoint Configuration";
> +	default:
> +		return "UNKNOWN command";
> +	}
> +}
> +
> +/**
> + * dwc3_gadget_generic_cmd_string - returns generic command string
> + * @cmd: command code
> + */
> +static inline const char *
> +dwc3_gadget_generic_cmd_string(u8 cmd)
> +{
> +	switch (cmd) {
> +	case DWC3_DGCMD_SET_LMP:
> +		return "Set LMP";
> +	case DWC3_DGCMD_SET_PERIODIC_PAR:
> +		return "Set Periodic Parameters";
> +	case DWC3_DGCMD_XMIT_FUNCTION:
> +		return "Transmit Function Wake Device Notification";
> +	case DWC3_DGCMD_SET_SCRATCHPAD_ADDR_LO:
> +		return "Set Scratchpad Buffer Array Address Lo";
> +	case DWC3_DGCMD_SET_SCRATCHPAD_ADDR_HI:
> +		return "Set Scratchpad Buffer Array Address Hi";
> +	case DWC3_DGCMD_SELECTED_FIFO_FLUSH:
> +		return "Selected FIFO Flush";
> +	case DWC3_DGCMD_ALL_FIFO_FLUSH:
> +		return "All FIFO Flush";
> +	case DWC3_DGCMD_SET_ENDPOINT_NRDY:
> +		return "Set Endpoint NRDY";
> +	case DWC3_DGCMD_RUN_SOC_BUS_LOOPBACK:
> +		return "Run SoC Bus Loopback Test";
> +	default:
> +		return "UNKNOWN";
> +	}
> +}
> +
> +/**
> + * dwc3_gadget_link_string - returns link name
> + * @link_state: link state code
> + */
> +static inline const char *
> +dwc3_gadget_link_string(enum dwc3_link_state link_state)
> +{
> +	switch (link_state) {
> +	case DWC3_LINK_STATE_U0:
> +		return "U0";
> +	case DWC3_LINK_STATE_U1:
> +		return "U1";
> +	case DWC3_LINK_STATE_U2:
> +		return "U2";
> +	case DWC3_LINK_STATE_U3:
> +		return "U3";
> +	case DWC3_LINK_STATE_SS_DIS:
> +		return "SS.Disabled";
> +	case DWC3_LINK_STATE_RX_DET:
> +		return "RX.Detect";
> +	case DWC3_LINK_STATE_SS_INACT:
> +		return "SS.Inactive";
> +	case DWC3_LINK_STATE_POLL:
> +		return "Polling";
> +	case DWC3_LINK_STATE_RECOV:
> +		return "Recovery";
> +	case DWC3_LINK_STATE_HRESET:
> +		return "Hot Reset";
> +	case DWC3_LINK_STATE_CMPLY:
> +		return "Compliance";
> +	case DWC3_LINK_STATE_LPBK:
> +		return "Loopback";
> +	case DWC3_LINK_STATE_RESET:
> +		return "Reset";
> +	case DWC3_LINK_STATE_RESUME:
> +		return "Resume";
> +	default:
> +		return "UNKNOWN link state\n";
> +	}
> +}
> +
> +/**
> + * dwc3_gadget_event_string - returns event name
> + * @event: the event code
> + */
> +static inline const char *dwc3_gadget_event_string(u8 event)
> +{
> +	switch (event) {
> +	case DWC3_DEVICE_EVENT_DISCONNECT:
> +		return "Disconnect";
> +	case DWC3_DEVICE_EVENT_RESET:
> +		return "Reset";
> +	case DWC3_DEVICE_EVENT_CONNECT_DONE:
> +		return "Connection Done";
> +	case DWC3_DEVICE_EVENT_LINK_STATUS_CHANGE:
> +		return "Link Status Change";
> +	case DWC3_DEVICE_EVENT_WAKEUP:
> +		return "WakeUp";
> +	case DWC3_DEVICE_EVENT_EOPF:
> +		return "End-Of-Frame";
> +	case DWC3_DEVICE_EVENT_SOF:
> +		return "Start-Of-Frame";
> +	case DWC3_DEVICE_EVENT_ERRATIC_ERROR:
> +		return "Erratic Error";
> +	case DWC3_DEVICE_EVENT_CMD_CMPL:
> +		return "Command Complete";
> +	case DWC3_DEVICE_EVENT_OVERFLOW:
> +		return "Overflow";
> +	}
> +
> +	return "UNKNOWN";
> +}
> +
> +/**
> + * dwc3_ep_event_string - returns event name
> + * @event: then event code
> + */
> +static inline const char *dwc3_ep_event_string(u8 event)
> +{
> +	switch (event) {
> +	case DWC3_DEPEVT_XFERCOMPLETE:
> +		return "Transfer Complete";
> +	case DWC3_DEPEVT_XFERINPROGRESS:
> +		return "Transfer In-Progress";
> +	case DWC3_DEPEVT_XFERNOTREADY:
> +		return "Transfer Not Ready";
> +	case DWC3_DEPEVT_RXTXFIFOEVT:
> +		return "FIFO";
> +	case DWC3_DEPEVT_STREAMEVT:
> +		return "Stream";
> +	case DWC3_DEPEVT_EPCMDCMPLT:
> +		return "Endpoint Command Complete";
> +	}
> +
> +	return "UNKNOWN";
> +}

Just curious - did you check the size of the compiled code after this
change? Since these functions are all inline now, it seems like the
compiler would be within its rights to duplicate the strings at each
of the call sites. Hopefully GCC is smarter than that, but you never
know...
Felipe Balbi Sept. 5, 2014, 6:35 p.m. | #2
Hi,

On Fri, Sep 05, 2014 at 06:23:24PM +0000, Paul Zimmerman wrote:
> > +static inline const char *dwc3_ep_event_string(u8 event)
> > +{
> > +	switch (event) {
> > +	case DWC3_DEPEVT_XFERCOMPLETE:
> > +		return "Transfer Complete";
> > +	case DWC3_DEPEVT_XFERINPROGRESS:
> > +		return "Transfer In-Progress";
> > +	case DWC3_DEPEVT_XFERNOTREADY:
> > +		return "Transfer Not Ready";
> > +	case DWC3_DEPEVT_RXTXFIFOEVT:
> > +		return "FIFO";
> > +	case DWC3_DEPEVT_STREAMEVT:
> > +		return "Stream";
> > +	case DWC3_DEPEVT_EPCMDCMPLT:
> > +		return "Endpoint Command Complete";
> > +	}
> > +
> > +	return "UNKNOWN";
> > +}
> 
> Just curious - did you check the size of the compiled code after this
> change? Since these functions are all inline now, it seems like the
> compiler would be within its rights to duplicate the strings at each
> of the call sites. Hopefully GCC is smarter than that, but you never
> know...

Before:

   text	   data	    bss	    dec	    hex	filename
   7559	    160	      8	   7727	   1e2f	drivers/usb/dwc3/core.o
   9875	      0	      0	   9875	   2693	drivers/usb/dwc3/debugfs.o
  46785	   2051	      8	  48844	   becc	drivers/usb/dwc3/dwc3.o
   7329	    722	      0	   8051	   1f73	drivers/usb/dwc3/ep0.o
  21488	   1169	      0	  22657	   5881	drivers/usb/dwc3/gadget.o
    534	      0	      0	    534	    216	drivers/usb/dwc3/host.o

After:

   text	   data	    bss	    dec	    hex	filename
   7559	    160	      8	   7727	   1e2f	drivers/usb/dwc3/core.o
   9875	      0	      0	   9875	   2693	drivers/usb/dwc3/debugfs.o
  46785	   2051	      8	  48844	   becc	drivers/usb/dwc3/dwc3.o
   7329	    722	      0	   8051	   1f73	drivers/usb/dwc3/ep0.o
  21488	   1169	      0	  22657	   5881	drivers/usb/dwc3/gadget.o
    534	      0	      0	    534	    216	drivers/usb/dwc3/host.o

Even if there was a difference, these little guys are only used when
you have either debug or trace enabled, so you're already dealing with a
development environment and the concerns which minimal there.

cheers

Patch

diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h
index fceb39d..e35a3d1 100644
--- a/drivers/usb/dwc3/debug.h
+++ b/drivers/usb/dwc3/debug.h
@@ -16,8 +16,170 @@ 
  * GNU General Public License for more details.
  */
 
+#ifndef __DWC3_DEBUG_H
+#define __DWC3_DEBUG_H
+
 #include "core.h"
 
+/**
+ * dwc3_gadget_ep_cmd_string - returns endpoint command string
+ * @cmd: command code
+ */
+static inline const char *
+dwc3_gadget_ep_cmd_string(u8 cmd)
+{
+	switch (cmd) {
+	case DWC3_DEPCMD_DEPSTARTCFG:
+		return "Start New Configuration";
+	case DWC3_DEPCMD_ENDTRANSFER:
+		return "End Transfer";
+	case DWC3_DEPCMD_UPDATETRANSFER:
+		return "Update Transfer";
+	case DWC3_DEPCMD_STARTTRANSFER:
+		return "Start Transfer";
+	case DWC3_DEPCMD_CLEARSTALL:
+		return "Clear Stall";
+	case DWC3_DEPCMD_SETSTALL:
+		return "Set Stall";
+	case DWC3_DEPCMD_GETEPSTATE:
+		return "Get Endpoint State";
+	case DWC3_DEPCMD_SETTRANSFRESOURCE:
+		return "Set Endpoint Transfer Resource";
+	case DWC3_DEPCMD_SETEPCONFIG:
+		return "Set Endpoint Configuration";
+	default:
+		return "UNKNOWN command";
+	}
+}
+
+/**
+ * dwc3_gadget_generic_cmd_string - returns generic command string
+ * @cmd: command code
+ */
+static inline const char *
+dwc3_gadget_generic_cmd_string(u8 cmd)
+{
+	switch (cmd) {
+	case DWC3_DGCMD_SET_LMP:
+		return "Set LMP";
+	case DWC3_DGCMD_SET_PERIODIC_PAR:
+		return "Set Periodic Parameters";
+	case DWC3_DGCMD_XMIT_FUNCTION:
+		return "Transmit Function Wake Device Notification";
+	case DWC3_DGCMD_SET_SCRATCHPAD_ADDR_LO:
+		return "Set Scratchpad Buffer Array Address Lo";
+	case DWC3_DGCMD_SET_SCRATCHPAD_ADDR_HI:
+		return "Set Scratchpad Buffer Array Address Hi";
+	case DWC3_DGCMD_SELECTED_FIFO_FLUSH:
+		return "Selected FIFO Flush";
+	case DWC3_DGCMD_ALL_FIFO_FLUSH:
+		return "All FIFO Flush";
+	case DWC3_DGCMD_SET_ENDPOINT_NRDY:
+		return "Set Endpoint NRDY";
+	case DWC3_DGCMD_RUN_SOC_BUS_LOOPBACK:
+		return "Run SoC Bus Loopback Test";
+	default:
+		return "UNKNOWN";
+	}
+}
+
+/**
+ * dwc3_gadget_link_string - returns link name
+ * @link_state: link state code
+ */
+static inline const char *
+dwc3_gadget_link_string(enum dwc3_link_state link_state)
+{
+	switch (link_state) {
+	case DWC3_LINK_STATE_U0:
+		return "U0";
+	case DWC3_LINK_STATE_U1:
+		return "U1";
+	case DWC3_LINK_STATE_U2:
+		return "U2";
+	case DWC3_LINK_STATE_U3:
+		return "U3";
+	case DWC3_LINK_STATE_SS_DIS:
+		return "SS.Disabled";
+	case DWC3_LINK_STATE_RX_DET:
+		return "RX.Detect";
+	case DWC3_LINK_STATE_SS_INACT:
+		return "SS.Inactive";
+	case DWC3_LINK_STATE_POLL:
+		return "Polling";
+	case DWC3_LINK_STATE_RECOV:
+		return "Recovery";
+	case DWC3_LINK_STATE_HRESET:
+		return "Hot Reset";
+	case DWC3_LINK_STATE_CMPLY:
+		return "Compliance";
+	case DWC3_LINK_STATE_LPBK:
+		return "Loopback";
+	case DWC3_LINK_STATE_RESET:
+		return "Reset";
+	case DWC3_LINK_STATE_RESUME:
+		return "Resume";
+	default:
+		return "UNKNOWN link state\n";
+	}
+}
+
+/**
+ * dwc3_gadget_event_string - returns event name
+ * @event: the event code
+ */
+static inline const char *dwc3_gadget_event_string(u8 event)
+{
+	switch (event) {
+	case DWC3_DEVICE_EVENT_DISCONNECT:
+		return "Disconnect";
+	case DWC3_DEVICE_EVENT_RESET:
+		return "Reset";
+	case DWC3_DEVICE_EVENT_CONNECT_DONE:
+		return "Connection Done";
+	case DWC3_DEVICE_EVENT_LINK_STATUS_CHANGE:
+		return "Link Status Change";
+	case DWC3_DEVICE_EVENT_WAKEUP:
+		return "WakeUp";
+	case DWC3_DEVICE_EVENT_EOPF:
+		return "End-Of-Frame";
+	case DWC3_DEVICE_EVENT_SOF:
+		return "Start-Of-Frame";
+	case DWC3_DEVICE_EVENT_ERRATIC_ERROR:
+		return "Erratic Error";
+	case DWC3_DEVICE_EVENT_CMD_CMPL:
+		return "Command Complete";
+	case DWC3_DEVICE_EVENT_OVERFLOW:
+		return "Overflow";
+	}
+
+	return "UNKNOWN";
+}
+
+/**
+ * dwc3_ep_event_string - returns event name
+ * @event: then event code
+ */
+static inline const char *dwc3_ep_event_string(u8 event)
+{
+	switch (event) {
+	case DWC3_DEPEVT_XFERCOMPLETE:
+		return "Transfer Complete";
+	case DWC3_DEPEVT_XFERINPROGRESS:
+		return "Transfer In-Progress";
+	case DWC3_DEPEVT_XFERNOTREADY:
+		return "Transfer Not Ready";
+	case DWC3_DEPEVT_RXTXFIFOEVT:
+		return "FIFO";
+	case DWC3_DEPEVT_STREAMEVT:
+		return "Stream";
+	case DWC3_DEPEVT_EPCMDCMPLT:
+		return "Endpoint Command Complete";
+	}
+
+	return "UNKNOWN";
+}
+
 #ifdef CONFIG_DEBUG_FS
 extern int dwc3_debugfs_init(struct dwc3 *);
 extern void dwc3_debugfs_exit(struct dwc3 *);
@@ -27,4 +189,4 @@  static inline int dwc3_debugfs_init(struct dwc3 *d)
 static inline void dwc3_debugfs_exit(struct dwc3 *d)
 {  }
 #endif
-
+#endif /* __DWC3_DEBUG_H */
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 21a3520..994e1d8 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -31,6 +31,7 @@ 
 #include <linux/usb/composite.h>
 
 #include "core.h"
+#include "debug.h"
 #include "gadget.h"
 #include "io.h"
 
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 307b513..77c49a6 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -30,6 +30,7 @@ 
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 
+#include "debug.h"
 #include "core.h"
 #include "gadget.h"
 #include "io.h"
@@ -272,94 +273,6 @@  void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
 	spin_lock(&dwc->lock);
 }
 
-static const char *dwc3_gadget_ep_cmd_string(u8 cmd)
-{
-	switch (cmd) {
-	case DWC3_DEPCMD_DEPSTARTCFG:
-		return "Start New Configuration";
-	case DWC3_DEPCMD_ENDTRANSFER:
-		return "End Transfer";
-	case DWC3_DEPCMD_UPDATETRANSFER:
-		return "Update Transfer";
-	case DWC3_DEPCMD_STARTTRANSFER:
-		return "Start Transfer";
-	case DWC3_DEPCMD_CLEARSTALL:
-		return "Clear Stall";
-	case DWC3_DEPCMD_SETSTALL:
-		return "Set Stall";
-	case DWC3_DEPCMD_GETEPSTATE:
-		return "Get Endpoint State";
-	case DWC3_DEPCMD_SETTRANSFRESOURCE:
-		return "Set Endpoint Transfer Resource";
-	case DWC3_DEPCMD_SETEPCONFIG:
-		return "Set Endpoint Configuration";
-	default:
-		return "UNKNOWN command";
-	}
-}
-
-static const char *dwc3_gadget_generic_cmd_string(u8 cmd)
-{
-	switch (cmd) {
-	case DWC3_DGCMD_SET_LMP:
-		return "Set LMP";
-	case DWC3_DGCMD_SET_PERIODIC_PAR:
-		return "Set Periodic Parameters";
-	case DWC3_DGCMD_XMIT_FUNCTION:
-		return "Transmit Function Wake Device Notification";
-	case DWC3_DGCMD_SET_SCRATCHPAD_ADDR_LO:
-		return "Set Scratchpad Buffer Array Address Lo";
-	case DWC3_DGCMD_SET_SCRATCHPAD_ADDR_HI:
-		return "Set Scratchpad Buffer Array Address Hi";
-	case DWC3_DGCMD_SELECTED_FIFO_FLUSH:
-		return "Selected FIFO Flush";
-	case DWC3_DGCMD_ALL_FIFO_FLUSH:
-		return "All FIFO Flush";
-	case DWC3_DGCMD_SET_ENDPOINT_NRDY:
-		return "Set Endpoint NRDY";
-	case DWC3_DGCMD_RUN_SOC_BUS_LOOPBACK:
-		return "Run SoC Bus Loopback Test";
-	default:
-		return "UNKNOWN";
-	}
-}
-
-static const char *dwc3_gadget_link_string(enum dwc3_link_state link_state)
-{
-	switch (link_state) {
-	case DWC3_LINK_STATE_U0:
-		return "U0";
-	case DWC3_LINK_STATE_U1:
-		return "U1";
-	case DWC3_LINK_STATE_U2:
-		return "U2";
-	case DWC3_LINK_STATE_U3:
-		return "U3";
-	case DWC3_LINK_STATE_SS_DIS:
-		return "SS.Disabled";
-	case DWC3_LINK_STATE_RX_DET:
-		return "RX.Detect";
-	case DWC3_LINK_STATE_SS_INACT:
-		return "SS.Inactive";
-	case DWC3_LINK_STATE_POLL:
-		return "Polling";
-	case DWC3_LINK_STATE_RECOV:
-		return "Recovery";
-	case DWC3_LINK_STATE_HRESET:
-		return "Hot Reset";
-	case DWC3_LINK_STATE_CMPLY:
-		return "Compliance";
-	case DWC3_LINK_STATE_LPBK:
-		return "Loopback";
-	case DWC3_LINK_STATE_RESET:
-		return "Reset";
-	case DWC3_LINK_STATE_RESUME:
-		return "Resume";
-	default:
-		return "UNKNOWN link state\n";
-	}
-}
-
 int dwc3_send_gadget_generic_command(struct dwc3 *dwc, int cmd, u32 param)
 {
 	u32		timeout = 500;
diff --git a/drivers/usb/dwc3/gadget.h b/drivers/usb/dwc3/gadget.h
index a0ee75b..178ad89 100644
--- a/drivers/usb/dwc3/gadget.h
+++ b/drivers/usb/dwc3/gadget.h
@@ -103,60 +103,4 @@  static inline u32 dwc3_gadget_ep_get_transfer_index(struct dwc3 *dwc, u8 number)
 	return DWC3_DEPCMD_GET_RSC_IDX(res_id);
 }
 
-/**
- * dwc3_gadget_event_string - returns event name
- * @event: the event code
- */
-static inline const char *dwc3_gadget_event_string(u8 event)
-{
-	switch (event) {
-	case DWC3_DEVICE_EVENT_DISCONNECT:
-		return "Disconnect";
-	case DWC3_DEVICE_EVENT_RESET:
-		return "Reset";
-	case DWC3_DEVICE_EVENT_CONNECT_DONE:
-		return "Connection Done";
-	case DWC3_DEVICE_EVENT_LINK_STATUS_CHANGE:
-		return "Link Status Change";
-	case DWC3_DEVICE_EVENT_WAKEUP:
-		return "WakeUp";
-	case DWC3_DEVICE_EVENT_EOPF:
-		return "End-Of-Frame";
-	case DWC3_DEVICE_EVENT_SOF:
-		return "Start-Of-Frame";
-	case DWC3_DEVICE_EVENT_ERRATIC_ERROR:
-		return "Erratic Error";
-	case DWC3_DEVICE_EVENT_CMD_CMPL:
-		return "Command Complete";
-	case DWC3_DEVICE_EVENT_OVERFLOW:
-		return "Overflow";
-	}
-
-	return "UNKNOWN";
-}
-
-/**
- * dwc3_ep_event_string - returns event name
- * @event: then event code
- */
-static inline const char *dwc3_ep_event_string(u8 event)
-{
-	switch (event) {
-	case DWC3_DEPEVT_XFERCOMPLETE:
-		return "Transfer Complete";
-	case DWC3_DEPEVT_XFERINPROGRESS:
-		return "Transfer In-Progress";
-	case DWC3_DEPEVT_XFERNOTREADY:
-		return "Transfer Not Ready";
-	case DWC3_DEPEVT_RXTXFIFOEVT:
-		return "FIFO";
-	case DWC3_DEPEVT_STREAMEVT:
-		return "Stream";
-	case DWC3_DEPEVT_EPCMDCMPLT:
-		return "Endpoint Command Complete";
-	}
-
-	return "UNKNOWN";
-}
-
 #endif /* __DRIVERS_USB_DWC3_GADGET_H */