[U-Boot] [PATCH] fastboot: mmc: fix pointer size warning in 64bit system
Kever Yang
kever.yang at rock-chips.com
Mon Aug 7 08:14:29 UTC 2017
To fix warning in ARM64:
common/fb_mmc.c: In function ‘fb_mmc_update_zimage’:
common/fb_mmc.c:216:13: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
hdr_addr = (u32)download_buffer + ALIGN(download_bytes, PAGE_SIZE);
^
common/fb_mmc.c:217:8: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
hdr = (struct andr_img_hdr *)hdr_addr;
Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---
common/fb_mmc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/common/fb_mmc.c b/common/fb_mmc.c
index a4b73dc..4511b8c 100644
--- a/common/fb_mmc.c
+++ b/common/fb_mmc.c
@@ -190,7 +190,6 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
unsigned int download_bytes,
char *response)
{
- u32 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;
@@ -213,8 +212,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 = (struct andr_img_hdr *)hdr_addr;
+ hdr = download_buffer + ALIGN(download_bytes, PAGE_SIZE);
/* Read boot image header */
hdr_sectors = fb_mmc_get_boot_header(dev_desc, &info, hdr, response);
--
1.9.1
More information about the U-Boot
mailing list