Skip to contentSkip to conversation

usb: Define USB_MAX_STOR_DEV in only one place

PATCH New Simon Glass 2 participants 5 messages Jan 7, 2016 – Jan 16, 2016

lore
Share & tools
lore
#0 lore raw

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
index e61a8c8..07fdf18 100644
@@ -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 7
 static 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
#1 lore raw

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 from usb_storage.c.

I guess you build tested this properly, right ?

Best regards,
Marek Vasut

#2 lore raw

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 from usb_storage.c.

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

Best regards,
Marek Vasut

Regards,
Simon

#3 lore raw

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 from usb_storage.c.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

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

#4 lore raw

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 from usb_storage.c.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

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.