[U-Boot] [PATCH] fastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as long

Tom Rini trini at konsulko.com
Tue Aug 22 20:49:54 UTC 2017


Otherwise:
drivers/usb/gadget/f_fastboot.c:564:32: warning: format "%lx" expects
argument of type "long unsigned int", but argument 3 has type "unsigned
int" [-Wformat=]

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 drivers/usb/gadget/f_fastboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 199621d9f540..f3382a965bed 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -561,7 +561,7 @@ static void do_bootm_on_complete(struct usb_ep *ep, struct usb_request *req)
 
 	puts("Booting kernel..\n");
 
-	sprintf(boot_addr_start, "0x%lx", CONFIG_FASTBOOT_BUF_ADDR);
+	sprintf(boot_addr_start, "0x%lx", (long)CONFIG_FASTBOOT_BUF_ADDR);
 	do_bootm(NULL, 0, 2, bootm_args);
 
 	/* This only happens if image is somehow faulty so we start over */
-- 
1.9.1



More information about the U-Boot mailing list