All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32
@ 2017-07-23 15:05 Simon Glass
  2017-07-23 15:47 ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2017-07-23 15:05 UTC (permalink / raw)
  To: u-boot

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@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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-24 16:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-23 15:05 [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32 Simon Glass
2017-07-23 15:47 ` Tom Rini
2017-07-24 12:09   ` Marek Vasut
2017-07-24 12:47     ` Tom Rini
2017-07-24 12:53       ` Marek Vasut
2017-07-24 13:28         ` Łukasz Majewski
2017-07-24 13:34           ` Marek Vasut
2017-07-24 16:43   ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.