]> git.sur5r.net Git - u-boot/commitdiff
common/fb_mmc.c: Fix warnings about casts
authorTom Rini <trini@konsulko.com>
Sat, 10 Jun 2017 13:15:37 +0000 (09:15 -0400)
committerMarek Vasut <marex@denx.de>
Mon, 21 Aug 2017 09:31:10 +0000 (11:31 +0200)
When building the flash zImage code on aarch64 we see warnings about
pointer size casts.  Use uintptr_t instead to correct these.

Cc: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-By: Sam Protsenko <semen.protsenko@linaro.org>
common/fb_mmc.c

index 5065ad5f73b624801ba425bf9b2feee91954e60a..2a8ba15f3190b96cd4ab08bb580992b3af0dc0b0 100644 (file)
@@ -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 */
+       uintptr_t 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 = (uintptr_t)download_buffer + ALIGN(download_bytes, PAGE_SIZE);
        hdr = (struct andr_img_hdr *)hdr_addr;
 
        /* Read boot image header */