From patchwork Wed Apr 3 00:47:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 233199 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 822922C0107 for ; Wed, 3 Apr 2013 11:48:11 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A26324A25F; Wed, 3 Apr 2013 02:48:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jji-fuX3dV0k; Wed, 3 Apr 2013 02:48:03 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6B90A4A263; Wed, 3 Apr 2013 02:48:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 72F074A263 for ; Wed, 3 Apr 2013 02:48:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Et0n1s-eZpZw for ; Wed, 3 Apr 2013 02:47:59 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mo-p05-ob.rzone.de (mo-p05-ob.rzone.de [81.169.146.180]) by theia.denx.de (Postfix) with ESMTP id 745764A25F for ; Wed, 3 Apr 2013 02:47:57 +0200 (CEST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub4+ReKfHD+mB0KMru/WvA== X-RZG-CLASS-ID: mo05 Received: from ubuntu-2012.fritz.box (p57B95378.dip.t-dialin.net [87.185.83.120]) by smtp.strato.de (jored mo43) (RZmta 31.23 DYNA|AUTH) with ESMTPA id Q04b99p32NhS73 ; Wed, 3 Apr 2013 02:47:51 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Wed, 3 Apr 2013 02:47:46 +0200 Message-Id: <1364950066-29308-1-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.8.2 Cc: Tom Rini Subject: [U-Boot] [PATCH] cfi_flash: Use uintptr_t for casts from u32 to void * X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Cc: Tom Rini --- 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,