From patchwork Wed Dec 14 10:04:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_Bie=C3=9Fmann?= X-Patchwork-Id: 131331 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 2F0DE1007D7 for ; Wed, 14 Dec 2011 21:04:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 516AC2821C; Wed, 14 Dec 2011 11:04:22 +0100 (CET) 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 JVC38wV0cU+m; Wed, 14 Dec 2011 11:04:22 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B76C82821E; Wed, 14 Dec 2011 11:04:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 978BD2821E for ; Wed, 14 Dec 2011 11:04:18 +0100 (CET) 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 oYAH14ldvMgG for ; Wed, 14 Dec 2011 11:04:18 +0100 (CET) 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 mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by theia.denx.de (Postfix) with ESMTPS id 0A4BB2821C for ; Wed, 14 Dec 2011 11:04:16 +0100 (CET) Received: by eaad1 with SMTP id d1so544462eaa.3 for ; Wed, 14 Dec 2011 02:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=pPVTBfIQ0VjUrL8/lZwDlTjZjwQJ+3EGtYvOyiQVr4c=; b=jsYab4LGxhDvQIZMgax1g53XW70iEAcX7h1AgzQW1E/Sn2AqAOxnPvkGOtLQ8tsScI mxz1hdM2VkOPme7AtHOYQm6H4H/0TNJzWbVQmFaED2DCP5ulHnsgRJFWkGJ/hXEjJ4+o B+T4P3l1T6johVZrgKBP8XL7pYxYSXt1EjAhg= Received: by 10.204.130.90 with SMTP id r26mr406637bks.46.1323857054695; Wed, 14 Dec 2011 02:04:14 -0800 (PST) Received: from azuregos.er.corscience.de (DSL01.212.114.252.242.ip-pool.NEFkom.net. [212.114.252.242]) by mx.google.com with ESMTPS id q16sm4532680bky.10.2011.12.14.02.04.13 (version=SSLv3 cipher=OTHER); Wed, 14 Dec 2011 02:04:14 -0800 (PST) From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= To: u-boot@lists.denx.de Date: Wed, 14 Dec 2011 11:04:07 +0100 Message-Id: <1323857047-11574-1-git-send-email-andreas.devel@googlemail.com> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <4EE843FE.1070504@wytron.com.tw> References: <4EE843FE.1070504@wytron.com.tw> MIME-Version: 1.0 Cc: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Subject: [U-Boot] [PATCH/RFC] fix several printf() modifiers 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Andreas Bießmann Some architectures define size_t to unsigned long even though they are 32 bit architectures. This patch fixes several warnings when running MAKEALL for avr32 architecture: ---8<--- mmu.c: In function 'mmu_init_r': mmu.c:25: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'uintptr_t' fat.c: In function 'do_fat_read': fat.c:879: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int' cmd_sf.c: In function 'spi_flash_update_block': cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t' cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t' --->8--- Signed-off-by: Andreas Bießmann cc: Mike Frysinger cc: Thomas Chou Tested-by: Thomas Chou --- arch/avr32/cpu/at32ap700x/mmu.c | 2 +- common/cmd_sf.c | 4 ++-- fs/fat/fat.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/avr32/cpu/at32ap700x/mmu.c b/arch/avr32/cpu/at32ap700x/mmu.c index c3a1b93..fda06a9 100644 --- a/arch/avr32/cpu/at32ap700x/mmu.c +++ b/arch/avr32/cpu/at32ap700x/mmu.c @@ -22,7 +22,7 @@ void mmu_init_r(unsigned long dest_addr) */ vmr_table_addr = (uintptr_t)&mmu_vmr_table; sysreg_write(PTBR, vmr_table_addr); - printf("VMR table @ 0x%08x\n", vmr_table_addr); + printf("VMR table @ %#lx\n", vmr_table_addr); /* Enable paging */ sysreg_write(MMUCR, SYSREG_BF(DRP, 1) | SYSREG_BF(DLA, 1) diff --git a/common/cmd_sf.c b/common/cmd_sf.c index 7225656..612fd18 100644 --- a/common/cmd_sf.c +++ b/common/cmd_sf.c @@ -127,12 +127,12 @@ static int do_spi_flash_probe(int argc, char * const argv[]) static const char *spi_flash_update_block(struct spi_flash *flash, u32 offset, size_t len, const char *buf, char *cmp_buf, size_t *skipped) { - debug("offset=%#x, sector_size=%#x, len=%#x\n", + debug("offset=%#x, sector_size=%#x, len=%#zx\n", offset, flash->sector_size, len); if (spi_flash_read(flash, offset, len, cmp_buf)) return "read"; if (memcmp(cmp_buf, buf, len) == 0) { - debug("Skip region %x size %x: no change\n", + debug("Skip region %x size %zx: no change\n", offset, len); *skipped += len; return NULL; diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 9a29458..dbb8db9 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -876,7 +876,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, while (1) { int i; - debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%d\n", + debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%zd\n", cursect, mydata->clust_size, DIRENTSPERBLOCK); if (disk_read(cursect,