[U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32
Simon Glass
sjg at chromium.org
Sun Jul 23 15:05:31 UTC 2017
This does not work on 64-bit machines. Update it to use ulong.
This fixes the following warnings in some zynq boards;
common/fb_mmc.c: In function 'fb_mmc_update_zimage':
common/fb_mmc.c:188:13: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
common/fb_mmc.c:189:8: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
Signed-off-by: Simon Glass <sjg at chromium.org>
---
common/fb_mmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/fb_mmc.c b/common/fb_mmc.c
index 2113b6c372..012c3f07b2 100644
--- a/common/fb_mmc.c
+++ b/common/fb_mmc.c
@@ -162,7 +162,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
void *download_buffer,
unsigned int download_bytes)
{
- u32 hdr_addr; /* boot image header address */
+ ulong hdr_addr; /* boot image header address */
struct andr_img_hdr *hdr; /* boot image header */
lbaint_t hdr_sectors; /* boot image header sectors */
u8 *ramdisk_buffer;
@@ -185,7 +185,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
}
/* Put boot image header in fastboot buffer after downloaded zImage */
- hdr_addr = (u32)download_buffer + ALIGN(download_bytes, PAGE_SIZE);
+ hdr_addr = (ulong)download_buffer + ALIGN(download_bytes, PAGE_SIZE);
hdr = (struct andr_img_hdr *)hdr_addr;
/* Read boot image header */
--
2.14.0.rc0.284.gd933b75aa4-goog
More information about the U-Boot
mailing list