From patchwork Mon Dec 15 23:36:26 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 14172 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 20AFEDDF59 for ; Tue, 16 Dec 2008 17:10:01 +1100 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1LCT6E-0008F4-4F; Tue, 16 Dec 2008 06:08:06 +0000 Received: from acsinet11.oracle.com ([141.146.126.233]) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1LCMzZ-0003WD-Jh for linux-mtd@lists.infradead.org; Mon, 15 Dec 2008 23:36:49 +0000 Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBFNbLNH008135 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 15 Dec 2008 23:37:23 GMT Received: from acsmt704.oracle.com (acsmt704.oracle.com [141.146.40.82]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBFNaMka003037; Mon, 15 Dec 2008 23:36:23 GMT Received: from [192.168.1.2] (/71.117.247.66) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 15 Dec 2008 23:36:12 +0000 Message-ID: <4946E9FA.6030607@oracle.com> Date: Mon, 15 Dec 2008 15:36:26 -0800 From: Randy Dunlap User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Stephen Rothwell Subject: [PATCH -next] mtd: fix m25p80 printk formats References: <20081216020642.fc1007d9.sfr@canb.auug.org.au> In-Reply-To: <20081216020642.fc1007d9.sfr@canb.auug.org.au> X-Source-IP: acsmt704.oracle.com [141.146.40.82] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A09020B.4946E9EE.01CB:SCFSTAT928724,ss=1,fgs=0 X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-Spam-Score: -4.0 (----) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (-4.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [141.146.126.233 listed in list.dnswl.org] X-Mailman-Approved-At: Tue, 16 Dec 2008 01:07:58 -0500 Cc: linux-mtd@lists.infradead.org, akpm , linux-next@vger.kernel.org, David Woodhouse , LKML X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Randy Dunlap Fix printk format warnings: build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:172: warning: format '%d' expects type 'int', but argument 4 has type 'uint64_t' build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:236: warning: format '%d' expects type 'int', but argument 6 has type 'uint64_t' build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:680: warning: format '%d' expects type 'int', but argument 5 has type 'uint64_t' build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:683: warning: format '%.8x' expects type 'unsigned int', but argument 3 has type 'uint64_t' build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:683: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'uint64_t' build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:693: warning: format '%.8x' expects type 'unsigned int', but argument 3 has type 'uint64_t' build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:724: warning: format '%.8x' expects type 'unsigned int', but argument 4 has type 'uint64_t' build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:724: warning: format '%.8x' expects type 'unsigned int', but argument 5 has type 'uint64_t' build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:724: warning: format '%u' expects type 'unsigned int', but argument 6 has type 'uint64_t' Signed-off-by: Randy Dunlap --- drivers/mtd/devices/m25p80.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) --- linux-next-20081215.orig/drivers/mtd/devices/m25p80.c +++ linux-next-20081215/drivers/mtd/devices/m25p80.c @@ -169,9 +169,9 @@ static int wait_till_ready(struct m25p * */ static int erase_chip(struct m25p *flash) { - DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB\n", + DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %lluKiB\n", dev_name(&flash->spi->dev), __func__, - flash->mtd.size / 1024); + (unsigned long long)flash->mtd.size / 1024); /* Wait until finished previous write command. */ if (wait_till_ready(flash)) @@ -233,9 +233,9 @@ static int m25p80_erase(struct mtd_info struct m25p *flash = mtd_to_m25p(mtd); u32 addr,len; - DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %d\n", + DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %u\n", dev_name(&flash->spi->dev), __func__, "at", - (u32)instr->addr, instr->len); + (u32)instr->addr, (u32)instr->len); /* sanity checks */ if (instr->addr + instr->len > flash->mtd.size) @@ -677,24 +677,26 @@ static int __devinit m25p_probe(struct s flash->mtd.erasesize = info->sector_size; } - dev_info(&spi->dev, "%s (%d Kbytes)\n", info->name, - flash->mtd.size / 1024); + dev_info(&spi->dev, "%s (%llu Kbytes)\n", info->name, + (unsigned long long)flash->mtd.size / 1024); DEBUG(MTD_DEBUG_LEVEL2, - "mtd .name = %s, .size = 0x%.8x (%uMiB) " + "mtd .name = %s, .size = 0x%.8llx (%lluMiB) " ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n", flash->mtd.name, - flash->mtd.size, flash->mtd.size / (1024*1024), + (unsigned long long)flash->mtd.size, + (unsigned long long)flash->mtd.size / (1024*1024), flash->mtd.erasesize, flash->mtd.erasesize / 1024, flash->mtd.numeraseregions); if (flash->mtd.numeraseregions) for (i = 0; i < flash->mtd.numeraseregions; i++) DEBUG(MTD_DEBUG_LEVEL2, - "mtd.eraseregions[%d] = { .offset = 0x%.8x, " + "mtd.eraseregions[%d] = { .offset = 0x%.8llx, " ".erasesize = 0x%.8x (%uKiB), " - ".numblocks = %d }\n", - i, flash->mtd.eraseregions[i].offset, + ".numblocks = %d }\n", i, + (unsigned long long) + flash->mtd.eraseregions[i].offset, flash->mtd.eraseregions[i].erasesize, flash->mtd.eraseregions[i].erasesize / 1024, flash->mtd.eraseregions[i].numblocks); @@ -722,12 +724,12 @@ static int __devinit m25p_probe(struct s if (nr_parts > 0) { for (i = 0; i < nr_parts; i++) { DEBUG(MTD_DEBUG_LEVEL2, "partitions[%d] = " - "{.name = %s, .offset = 0x%.8x, " - ".size = 0x%.8x (%uKiB) }\n", + "{.name = %s, .offset = 0x%.8llx, " + ".size = 0x%.8llx (%lluKiB) }\n", i, parts[i].name, - parts[i].offset, - parts[i].size, - parts[i].size / 1024); + (unsigned long long)parts[i].offset, + (unsigned long long)parts[i].size, + (unsigned long long)(parts[i].size / 1024)); } flash->partitioned = 1; return add_mtd_partitions(&flash->mtd, parts, nr_parts);