* [PATCH] usb: core: devices: remove dead code under #ifdef PROC_EXTRA
@ 2022-04-18 20:33 Sergey Shtylyov
0 siblings, 0 replies; only message in thread
From: Sergey Shtylyov @ 2022-04-18 20:33 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-usb
usb_dump_hub_descriptor() and usb_dump_string() are defined under #ifdef
PROC_EXTRA (while PROC_EXTRA doesn't seem to have ever been #define'd)
since the dawn of the git era -- remove this dead code at last...
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
This patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo.
drivers/usb/core/devices.c | 35 -----------------------------------
1 file changed, 35 deletions(-)
Index: usb/drivers/usb/core/devices.c
===================================================================
--- usb.orig/drivers/usb/core/devices.c
+++ usb/drivers/usb/core/devices.c
@@ -390,41 +390,6 @@ static char *usb_dump_desc(char *start,
return start;
}
-
-#ifdef PROC_EXTRA /* TBD: may want to add this code later */
-
-static char *usb_dump_hub_descriptor(char *start, char *end,
- const struct usb_hub_descriptor *desc)
-{
- int leng = USB_DT_HUB_NONVAR_SIZE;
- unsigned char *ptr = (unsigned char *)desc;
-
- if (start > end)
- return start;
- start += sprintf(start, "Interface:");
- while (leng && start <= end) {
- start += sprintf(start, " %02x", *ptr);
- ptr++; leng--;
- }
- *start++ = '\n';
- return start;
-}
-
-static char *usb_dump_string(char *start, char *end,
- const struct usb_device *dev, char *id, int index)
-{
- if (start > end)
- return start;
- start += sprintf(start, "Interface:");
- if (index <= dev->maxstring && dev->stringindex &&
- dev->stringindex[index])
- start += sprintf(start, "%s: %.100s ", id,
- dev->stringindex[index]);
- return start;
-}
-
-#endif /* PROC_EXTRA */
-
/*****************************************************************/
/* This is a recursive function. Parameters:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-18 20:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 20:33 [PATCH] usb: core: devices: remove dead code under #ifdef PROC_EXTRA Sergey Shtylyov
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.