public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] cfi_flash: Use uintptr_t for casts from u32 to void *
@ 2013-04-03  0:47 Stefan Roese
  2013-04-04  5:07 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2013-04-03  0:47 UTC (permalink / raw)
  To: u-boot

This fixes this build warning:

Configuring for qemu_mips64 - Board: qemu-mips64, Options: SYS_BIG_ENDIAN
   text    data     bss     dec     hex filename
 215344   13082  218720  447146   6d2aa qemu_mips64/u-boot
cfi_flash.c: In function 'flash_map':
cfi_flash.c:217:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@ti.com>
---
 drivers/mtd/cfi_flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 328c76d..cf10b0d 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -214,7 +214,7 @@ flash_map (flash_info_t * info, flash_sect_t sect, uint offset)
 	unsigned int addr = (info->start[sect] + byte_offset);
 	unsigned int mask = 0xffffffff << (info->portwidth - 1);
 
-	return (void *)(addr & mask);
+	return (void *)(uintptr_t)(addr & mask);
 }
 
 static inline void flash_unmap(flash_info_t *info, flash_sect_t sect,
-- 
1.8.2

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

* [U-Boot] [PATCH] cfi_flash: Use uintptr_t for casts from u32 to void *
  2013-04-03  0:47 [U-Boot] [PATCH] cfi_flash: Use uintptr_t for casts from u32 to void * Stefan Roese
@ 2013-04-04  5:07 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2013-04-04  5:07 UTC (permalink / raw)
  To: u-boot

On 03.04.2013 02:47, Stefan Roese wrote:
> This fixes this build warning:
> 
> Configuring for qemu_mips64 - Board: qemu-mips64, Options: SYS_BIG_ENDIAN
>    text    data     bss     dec     hex filename
>  215344   13082  218720  447146   6d2aa qemu_mips64/u-boot
> cfi_flash.c: In function 'flash_map':
> cfi_flash.c:217:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tom Rini <trini@ti.com>

Applied to u-boot-cfi-flash/master.

Thanks,
Stefan

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

end of thread, other threads:[~2013-04-04  5:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03  0:47 [U-Boot] [PATCH] cfi_flash: Use uintptr_t for casts from u32 to void * Stefan Roese
2013-04-04  5:07 ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox