public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/1] usb: Remove unused variable in usb_setup_descriptor()
@ 2015-04-19  9:33 Hans de Goede
  2015-04-19  9:33 ` [U-Boot] [PATCH] " Hans de Goede
  0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2015-04-19  9:33 UTC (permalink / raw)
  To: u-boot

Hi All,

Note this applies on top of the V3 dm pull request Simon send yesterday.

Regards,

Hans

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: Remove unused variable in usb_setup_descriptor()
  2015-04-19  9:33 [U-Boot] [PATCH 0/1] usb: Remove unused variable in usb_setup_descriptor() Hans de Goede
@ 2015-04-19  9:33 ` Hans de Goede
  2015-04-19 13:36   ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2015-04-19  9:33 UTC (permalink / raw)
  To: u-boot

The compiler did not catch this as it was marked __maybe_unused.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 common/usb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index a4820d3..305d5cf 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -931,8 +931,6 @@ static int get_descriptor_len(struct usb_device *dev, int len, int expect_len)
 
 static int usb_setup_descriptor(struct usb_device *dev, bool do_read)
 {
-	__maybe_unused struct usb_device_descriptor *desc;
-
 	/*
 	 * This is a Windows scheme of initialization sequence, with double
 	 * reset of the device (Linux uses the same sequence)
-- 
2.3.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: Remove unused variable in usb_setup_descriptor()
  2015-04-19  9:33 ` [U-Boot] [PATCH] " Hans de Goede
@ 2015-04-19 13:36   ` Simon Glass
  2015-04-20  7:27     ` Hans de Goede
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2015-04-19 13:36 UTC (permalink / raw)
  To: u-boot

Hi Hans,

On 19 April 2015 at 03:33, Hans de Goede <hdegoede@redhat.com> wrote:
> The compiler did not catch this as it was marked __maybe_unused.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  common/usb.c | 2 --
>  1 file changed, 2 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>

Thanks for spotting this. Another minor problem is that
get_descriptor_len() allocates a 512-byte buffer but only 64 bytes is
needed.

Regards,
Simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: Remove unused variable in usb_setup_descriptor()
  2015-04-19 13:36   ` Simon Glass
@ 2015-04-20  7:27     ` Hans de Goede
  2015-04-21 10:21       ` Marek Vasut
  0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2015-04-20  7:27 UTC (permalink / raw)
  To: u-boot

Hi,

On 19-04-15 15:36, Simon Glass wrote:
> Hi Hans,
>
> On 19 April 2015 at 03:33, Hans de Goede <hdegoede@redhat.com> wrote:
>> The compiler did not catch this as it was marked __maybe_unused.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   common/usb.c | 2 --
>>   1 file changed, 2 deletions(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>
>
> Thanks for spotting this. Another minor problem is that
> get_descriptor_len() allocates a 512-byte buffer but only 64 bytes is
> needed.

Good one, someone should probably write a patch for this. Consider such
a patch Acked-by: Hans de Goede <hdegoede@redhat.com> .

Whom is going to pick up these fixes and upstream them ?

Regards,

Hans

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: Remove unused variable in usb_setup_descriptor()
  2015-04-20  7:27     ` Hans de Goede
@ 2015-04-21 10:21       ` Marek Vasut
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2015-04-21 10:21 UTC (permalink / raw)
  To: u-boot

On Monday, April 20, 2015 at 09:27:51 AM, Hans de Goede wrote:
> Hi,
> 
> On 19-04-15 15:36, Simon Glass wrote:
> > Hi Hans,
> > 
> > On 19 April 2015 at 03:33, Hans de Goede <hdegoede@redhat.com> wrote:
> >> The compiler did not catch this as it was marked __maybe_unused.
> >> 
> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >> ---
> >> 
> >>   common/usb.c | 2 --
> >>   1 file changed, 2 deletions(-)
> > 
> > Acked-by: Simon Glass <sjg@chromium.org>
> > 
> > Thanks for spotting this. Another minor problem is that
> > get_descriptor_len() allocates a 512-byte buffer but only 64 bytes is
> > needed.
> 
> Good one, someone should probably write a patch for this. Consider such
> a patch Acked-by: Hans de Goede <hdegoede@redhat.com> .
> 
> Whom is going to pick up these fixes and upstream them ?

Applied to u-boot-usb/master, thanks!

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-21 10:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-19  9:33 [U-Boot] [PATCH 0/1] usb: Remove unused variable in usb_setup_descriptor() Hans de Goede
2015-04-19  9:33 ` [U-Boot] [PATCH] " Hans de Goede
2015-04-19 13:36   ` Simon Glass
2015-04-20  7:27     ` Hans de Goede
2015-04-21 10:21       ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox