usb: Define USB_MAX_STOR_DEV in only one place
PATCH 1/1 usb: Define USB_MAX_STOR_DEV in only one place
We can define this in the header file and use it in usb_storage.c. There is no need to define it twice. Remove the #define from usb_storage.c.
---
common/usb_storage.c | 1 - 1 file changed, 1 deletion(-)
common/usb_storage.c +0 -1
@@ -65,7 +65,6 @@ static const unsigned char us_direction[256/8] = { static ccb usb_ccb __attribute__((aligned(ARCH_DMA_MINALIGN)));static __u32 CBWTag; -#define USB_MAX_STOR_DEV 7static int usb_max_devs;/* number of highest available usb device */ static block_dev_desc_t usb_dev_desc[USB_MAX_STOR_DEV ];
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
PATCH 1/1 usb: Define USB_MAX_STOR_DEV in only one place
Quoted 4 lines · Simon Glass
We can define this in the header file and use it in
usb_storage.c. There is no need to define it twice. Remove the #define fromusb_storage.c.Signed-off-by Simon Glass <[email protected]>
I guess you build tested this properly, right ?
Best regards,
Marek Vasut
PATCH 1/1 usb: Define USB_MAX_STOR_DEV in only one place
Hi Marek,
Quoted 7 lines · Marek Vasut
Quoted 4 lines · Simon Glass
We can define this in the header file and use it in
usb_storage.c. There is no need to define it twice. Remove the #define fromusb_storage.c.Signed-off-by Simon Glass <[email protected]>I guess you build tested this properly, right ?
Yes. I was initially nervous that there might be a reason for the two definitions but I cannot see what it might be. So I think this patch is safe. Anyway I'll hold off applying it until early in the merge window.
Quoted 5 lines
Reviewed-by Marek Vasut <[email protected]>Best regards,
Marek Vasut
Regards,
Simon
PATCH 1/1 usb: Define USB_MAX_STOR_DEV in only one place
Quoted 7 lines · Simon Glass
Hi Marek,
Quoted 4 lines · Marek Vasut
Quoted 3 lines · Simon Glass
We can define this in the header file and use it in
usb_storage.c. There is no need to define it twice. Remove the #define fromusb_storage.c.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Simon Glass <[email protected]>I guess you build tested this properly, right ?
Yes. I was initially nervous that there might be a reason for the two definitions but I cannot see what it might be. So I think this patch is safe. Anyway I'll hold off applying it until early in the merge window.
That's a good idea indeed. Thanks!
Best regards,
Marek Vasut
PATCH 1/1 usb: Define USB_MAX_STOR_DEV in only one place
Quoted 17 lines · Marek Vasut
Quoted 7 lines · Simon Glass
Hi Marek,
Quoted 4 lines · Marek Vasut
Quoted 3 lines · Simon Glass
We can define this in the header file and use it in
usb_storage.c. There is no need to define it twice. Remove the #define fromusb_storage.c.Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Simon Glass <[email protected]>I guess you build tested this properly, right ?
Yes. I was initially nervous that there might be a reason for the two definitions but I cannot see what it might be. So I think this patch is safe. Anyway I'll hold off applying it until early in the merge window.
Quoted 4 lines
That's a good idea indeed. Thanks!
Best regards,
Marek Vasut
Applied to u-boot-dm.