usb: Remove unused variable in usb_setup_descriptor()
cover usb: Remove unused variable in usb_setup_descriptor()
Hi All,
Note this applies on top of the V3 dm pull request Simon send yesterday.
Regards,
Hans
PATCH 1/1 usb: Remove unused variable in usb_setup_descriptor()
The compiler did not catch this as it was marked __maybe_unused.
--- common/usb.c | 2 -- 1 file changed, 2 deletions(-)
common/usb.c +0 -2
@@ -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)
Signature · 1 line
2.3.5
PATCH 1/1 usb: Remove unused variable in usb_setup_descriptor()
Hi Hans,
Quoted 6 lines · Hans de Goede
The compiler did not catch this as it was marked
__maybe_unused.Signed-off-by Hans de Goede <[email protected]>--- common/usb.c | 2 -- 1 file changed, 2 deletions(-)
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
PATCH 1/1 usb: Remove unused variable in usb_setup_descriptor()
Hi,
Quoted 10 lines · Simon Glass
Hi Hans,
Quoted 6 lines · Hans de Goede
The compiler did not catch this as it was marked
__maybe_unused.Signed-off-by Hans de Goede <[email protected]>--- common/usb.c | 2 -- 1 file changed, 2 deletions(-)
Quoted 5 lines
Acked-by Simon Glass <[email protected]>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 <[email protected]> .
Whom is going to pick up these fixes and upstream them ?
Regards,
Hans
PATCH 1/1 usb: Remove unused variable in usb_setup_descriptor()
Quoted 16 lines · Hans de Goede
Hi,
Quoted 13 lines · Simon Glass
Hi Hans,
Quoted 7 lines · Hans de Goede
The compiler did not catch this as it was marked
__maybe_unused.Signed-off-by Hans de Goede <[email protected]>---
common/usb.c | 2 -- 1 file changed, 2 deletions(-)Acked-by Simon Glass <[email protected]>
Quoted 8 lines
Quoted 3 lines
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 <[email protected]> .
Whom is going to pick up these fixes and upstream them ?
Applied to u-boot-usb/master, thanks!
Best regards,
Marek Vasut