[U-Boot] [PATCH 02/13] usb: Build warning fixes for 64-bit

Thierry Reding thierry.reding at gmail.com
Fri Mar 20 12:41:17 CET 2015


From: Thierry Reding <treding at nvidia.com>

Fix an pointer to integer cast size mismatch warning by casting to
unsigned long instead of unsigned int and fix up the corresponding
printf format string to use %lx instead of %x.

Also remove a pointless cast producing a size mismatch warning.

Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
Signed-off-by: Thierry Reding <treding at nvidia.com>
---
 common/usb_storage.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/usb_storage.c b/common/usb_storage.c
index 1411737bed89..cfa3cb124e15 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -336,8 +336,8 @@ static int us_one_transfer(struct us_data *us, int pipe, char *buf, int length)
 		/* set up the transfer loop */
 		do {
 			/* transfer the data */
-			debug("Bulk xfer 0x%x(%d) try #%d\n",
-			      (unsigned int)buf, this_xfer, 11 - maxtry);
+			debug("Bulk xfer 0x%lx(%d) try #%d\n",
+			      (unsigned long)buf, this_xfer, 11 - maxtry);
 			result = usb_bulk_msg(us->pusb_dev, pipe, buf,
 					      this_xfer, &partial,
 					      USB_CNTL_TIMEOUT * 5);
@@ -603,7 +603,7 @@ static int usb_stor_CBI_get_status(ccb *srb, struct us_data *us)
 			(void *) &us->ip_data, us->irqmaxp, us->irqinterval);
 	timeout = 1000;
 	while (timeout--) {
-		if ((volatile int *) us->ip_wanted == NULL)
+		if (us->ip_wanted == 0)
 			break;
 		mdelay(10);
 	}
-- 
2.3.2



More information about the U-Boot mailing list