diff mbox

[U-Boot] usb: dfu: thor: gadget: Remove dead code

Message ID 1410441971-16983-1-git-send-email-l.majewski@samsung.com
State Accepted
Delegated to: Łukasz Majewski
Headers show

Commit Message

Łukasz Majewski Sept. 11, 2014, 1:26 p.m. UTC
This code is not used anymore in the current DFU implementation and
can be safely removed.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
---
 drivers/usb/gadget/f_dfu.c  |  8 --------
 drivers/usb/gadget/f_thor.c | 10 ----------
 2 files changed, 18 deletions(-)

Comments

Marek Vasut Sept. 11, 2014, 3:47 p.m. UTC | #1
On Thursday, September 11, 2014 at 03:26:10 PM, Lukasz Majewski wrote:
> This code is not used anymore in the current DFU implementation and
> can be safely removed.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>

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

Best regards,
Marek Vasut
Jeroen Hofstee Sept. 11, 2014, 7:17 p.m. UTC | #2
Hello Marek,

On 11-09-14 17:47, Marek Vasut wrote:
> On Thursday, September 11, 2014 at 03:26:10 PM, Lukasz Majewski wrote:
>> This code is not used anymore in the current DFU implementation and
>> can be safely removed.
>>
>> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> How come the compiler didn't spew that this is unused ?

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

Regards,
Jeroen
Marek Vasut Sept. 11, 2014, 7:36 p.m. UTC | #3
On Thursday, September 11, 2014 at 09:17:57 PM, Jeroen Hofstee wrote:
> Hello Marek,
> 
> On 11-09-14 17:47, Marek Vasut wrote:
> > On Thursday, September 11, 2014 at 03:26:10 PM, Lukasz Majewski wrote:
> >> This code is not used anymore in the current DFU implementation and
> >> can be safely removed.
> >> 
> >> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> > 
> > 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
Heiko Schocher Sept. 12, 2014, 4:52 a.m. UTC | #4
Hello Lukasz,

Am 11.09.2014 15:26, schrieb Lukasz Majewski:
> This code is not used anymore in the current DFU implementation and
> can be safely removed.
>
> Signed-off-by: Lukasz Majewski<l.majewski@samsung.com>
> ---
>   drivers/usb/gadget/f_dfu.c  |  8 --------
>   drivers/usb/gadget/f_thor.c | 10 ----------
>   2 files changed, 18 deletions(-)

Thanks!

Acked-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
Łukasz Majewski Sept. 15, 2014, 10:28 a.m. UTC | #5
Hi Lukasz,

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

Applied to u-boot-dfu
diff mbox

Patch

diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
index 3e4f029..d040606 100644
--- a/drivers/usb/gadget/f_dfu.c
+++ b/drivers/usb/gadget/f_dfu.c
@@ -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";
 
 /*
diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
index c85b0fb..78519fa 100644
--- a/drivers/usb/gadget/f_thor.c
+++ b/drivers/usb/gadget/f_thor.c
@@ -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