Skip to contentSkip to conversation

usb: dfu: thor: gadget: Remove dead code

PATCH New Lukasz Majewski 4 participants 6 messages Sep 11, 2014 – Sep 15, 2014 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dfu: thor: gadget: Remove dead code

This code is not used anymore in the current DFU implementation and can be safely removed.

---
 drivers/usb/gadget/f_dfu.c  |  8 --------
 drivers/usb/gadget/f_thor.c | 10 ----------
 2 files changed, 18 deletions(-)
drivers/usb/gadget/f_dfu.c +0 -8
index 3e4f029..d040606 100644
@@ -81,14 +81,6 @@ static struct usb_descriptor_header *dfu_runtime_descs[] = {
 	NULL,
 };
 
-static const struct usb_qualifier_descriptor dev_qualifier = {
-	.bLength =		sizeof dev_qualifier,
-	.bDescriptorType =	USB_DT_DEVICE_QUALIFIER,
-	.bcdUSB =		__constant_cpu_to_le16(0x0200),
-	.bDeviceClass =		USB_CLASS_VENDOR_SPEC,
-	.bNumConfigurations =	1,
-};
-
 static const char dfu_name[] = "Device Firmware Upgrade";
 
 /*
drivers/usb/gadget/f_thor.c +0 -10
index c85b0fb..78519fa 100644
@@ -458,16 +458,6 @@ static struct usb_endpoint_descriptor hs_int_desc = {
 	.bInterval = 0x9,
 };
 
-static struct usb_qualifier_descriptor dev_qualifier = {
-	.bLength =		sizeof(dev_qualifier),
-	.bDescriptorType =	USB_DT_DEVICE_QUALIFIER,
-
-	.bcdUSB =		__constant_cpu_to_le16(0x0200),
-	.bDeviceClass =	USB_CLASS_VENDOR_SPEC,
-
-	.bNumConfigurations =	2,
-};
-
 /*
  * This attribute vendor descriptor is necessary for correct operation with
  * Windows version of THOR download program
Signature · 1 line
2.0.0.rc2
#1 lore raw

PATCH 1/1 usb: dfu: thor: gadget: Remove dead code

Quoted 4 lines · Lukasz Majewski

This code is not used anymore in the current DFU implementation and can be safely removed.

How come the compiler didn't spew that this is unused ?

Best regards,
Marek Vasut

#3 lore raw

PATCH 1/1 usb: dfu: thor: gadget: Remove dead code

Quoted 4 lines · Jeroen Hofstee

Hello Marek,

Quoted 1 line · Marek Vasut

On Thursday, September 11, 2014 at 03:26:10 PM, Lukasz Majewski wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

This code is not used anymore in the current DFU implementation and can be safely removed.

How come the compiler didn't spew that this is unused ?

gcc feature, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13029.

I see, thanks for pointing this out!

Best regards,
Marek Vasut

#4 lore raw

PATCH 1/1 usb: dfu: thor: gadget: Remove dead code

In reply to Lukasz Majewski

Hello Lukasz,

Am 11.09.2014 15:26, schrieb Lukasz Majewski:

Quoted 8 lines

This code is not used anymore in the current DFU implementation and can be safely removed.

---
  drivers/usb/gadget/f_dfu.c  |  8 --------
  drivers/usb/gadget/f_thor.c | 10 ----------
  2 files changed, 18 deletions(-)

Thanks!

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#5 lore raw

PATCH 1/1 usb: dfu: thor: gadget: Remove dead code

In reply to Lukasz Majewski

Hi Lukasz,

Quoted 2 lines

This code is not used anymore in the current DFU implementation and can be safely removed.

Applied to u-boot-dfu

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group