public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Re: linux-next: Tree for December 15 (MTD)
       [not found] <20081216020642.fc1007d9.sfr@canb.auug.org.au>
@ 2008-12-15 23:27 ` Randy Dunlap
  2008-12-15 23:33 ` [PATCH -next] mtd: fix dataflash printk formats Randy Dunlap
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2008-12-15 23:27 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-mtd, linux-next, David Woodhouse, LKML

Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20081212:
> 
> New tree:
> 	boot-params
> 
> Undropped tree:
> 	mtd


On i386 builds, I'm seeing

build-r7137.out:mtd_dataflash.c:(.text+0x10dff4): undefined reference to `__umoddi3'
build-r7137.out:mtd_dataflash.c:(.text+0x10e010): undefined reference to `__umoddi3'
build-r7137.out:mtd_dataflash.c:(.text+0x10e09f): undefined reference to `__udivdi3'

which are caused by % and / operations where the denominator is a variable:

	/* Sanity checks */
	if ((instr->addr + instr->len) > mtd->size
			|| (instr->len % priv->page_size) != 0
			|| (instr->addr % priv->page_size) != 0)
		return -EINVAL;

...
		/* Calculate flash page address; use block erase (for speed) if
		 * we're at a block boundary and need to erase the whole block.
		 */
		pageaddr = instr->addr / priv->page_size;


~Randy

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

* [PATCH -next] mtd: fix dataflash printk formats
       [not found] <20081216020642.fc1007d9.sfr@canb.auug.org.au>
  2008-12-15 23:27 ` linux-next: Tree for December 15 (MTD) Randy Dunlap
@ 2008-12-15 23:33 ` Randy Dunlap
  2008-12-15 23:36 ` [PATCH -next] mtd: fix m25p80 " Randy Dunlap
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2008-12-15 23:33 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-mtd, akpm, linux-next, David Woodhouse, LKML

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix printk format warnings:

build-r7137.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/mtd_dataflash.c:156: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'uint64_t'
build-r7137.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/mtd_dataflash.c:156: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'uint64_t'
build-r7137.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/mtd_dataflash.c:670: warning: format '%d' expects type 'int', but argument 5 has type 'uint64_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/mtd/devices/mtd_dataflash.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- linux-next-20081215.orig/drivers/mtd/devices/mtd_dataflash.c
+++ linux-next-20081215/drivers/mtd/devices/mtd_dataflash.c
@@ -153,9 +153,10 @@ static int dataflash_erase(struct mtd_in
 	unsigned		blocksize = priv->page_size << 3;
 	uint8_t			*command;
 
-	DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%x len 0x%x\n",
+	DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%llx len 0x%llx\n",
 			dev_name(&spi->dev),
-			instr->addr, instr->len);
+			(unsigned long long)instr->addr,
+			(unsigned long long)instr->len);
 
 	/* Sanity checks */
 	if ((instr->addr + instr->len) > mtd->size
@@ -667,8 +668,8 @@ add_dataflash_otp(struct spi_device *spi
 	if (revision >= 'c')
 		otp_tag = otp_setup(device, revision);
 
-	dev_info(&spi->dev, "%s (%d KBytes) pagesize %d bytes%s\n",
-			name, DIV_ROUND_UP(device->size, 1024),
+	dev_info(&spi->dev, "%s (%llu KBytes) pagesize %d bytes%s\n",
+			name, (unsigned long long)DIV_ROUND_UP(device->size, 1024),
 			pagesize, otp_tag);
 	dev_set_drvdata(&spi->dev, priv);
 

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

* [PATCH -next] mtd: fix m25p80 printk formats
       [not found] <20081216020642.fc1007d9.sfr@canb.auug.org.au>
  2008-12-15 23:27 ` linux-next: Tree for December 15 (MTD) Randy Dunlap
  2008-12-15 23:33 ` [PATCH -next] mtd: fix dataflash printk formats Randy Dunlap
@ 2008-12-15 23:36 ` Randy Dunlap
  2008-12-15 23:37 ` [PATCH -next] mtd: fix nandsim sched.h references Randy Dunlap
  2008-12-15 23:38 ` [PATCH -next] mtd: fix nettel printk formats Randy Dunlap
  4 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2008-12-15 23:36 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-mtd, akpm, linux-next, David Woodhouse, LKML

From: Randy Dunlap <randy.dunlap@oracle.com>

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 <randy.dunlap@oracle.com>
---
 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);

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

* [PATCH -next] mtd: fix nandsim sched.h references
       [not found] <20081216020642.fc1007d9.sfr@canb.auug.org.au>
                   ` (2 preceding siblings ...)
  2008-12-15 23:36 ` [PATCH -next] mtd: fix m25p80 " Randy Dunlap
@ 2008-12-15 23:37 ` Randy Dunlap
  2008-12-15 23:38 ` [PATCH -next] mtd: fix nettel printk formats Randy Dunlap
  4 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2008-12-15 23:37 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-mtd, akpm, linux-next, David Woodhouse, LKML

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix sched.h references:

build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1326: error: dereferencing pointer to incomplete type
build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1326: error: 'PF_MEMALLOC' undeclared (first use in this function)
build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1328: error: dereferencing pointer to incomplete type
build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1335: error: dereferencing pointer to incomplete type
build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1335: error: 'PF_MEMALLOC' undeclared (first use in this function)
build-r7149.out:make[4]: *** [drivers/mtd/nand/nandsim.o] Error 1

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/mtd/nand/nandsim.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20081215.orig/drivers/mtd/nand/nandsim.c
+++ linux-next-20081215/drivers/mtd/nand/nandsim.c
@@ -38,6 +38,7 @@
 #include <linux/delay.h>
 #include <linux/list.h>
 #include <linux/random.h>
+#include <linux/sched.h>
 #include <linux/fs.h>
 #include <linux/pagemap.h>
 

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

* [PATCH -next] mtd: fix nettel printk formats
       [not found] <20081216020642.fc1007d9.sfr@canb.auug.org.au>
                   ` (3 preceding siblings ...)
  2008-12-15 23:37 ` [PATCH -next] mtd: fix nandsim sched.h references Randy Dunlap
@ 2008-12-15 23:38 ` Randy Dunlap
  4 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2008-12-15 23:38 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-mtd, akpm, linux-next, David Woodhouse, LKML

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix printk format references:

drivers/mtd/maps/nettel.c:361: warning: format '%d' expects type 'int', but argument 2 has type 'uint64_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/mtd/maps/nettel.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-next-20081215.orig/drivers/mtd/maps/nettel.c
+++ linux-next-20081215/drivers/mtd/maps/nettel.c
@@ -357,8 +357,8 @@ static int __init nettel_init(void)
 		*intel1par = 0;
 	}
 
-	printk(KERN_NOTICE "SNAPGEAR: Intel flash device size = %dK\n",
-		(intel_mtd->size >> 10));
+	printk(KERN_NOTICE "SNAPGEAR: Intel flash device size = %lluK\n",
+		(unsigned long long)(intel_mtd->size >> 10));
 
 	intel_mtd->owner = THIS_MODULE;
 

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

end of thread, other threads:[~2008-12-16  0:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20081216020642.fc1007d9.sfr@canb.auug.org.au>
2008-12-15 23:27 ` linux-next: Tree for December 15 (MTD) Randy Dunlap
2008-12-15 23:33 ` [PATCH -next] mtd: fix dataflash printk formats Randy Dunlap
2008-12-15 23:36 ` [PATCH -next] mtd: fix m25p80 " Randy Dunlap
2008-12-15 23:37 ` [PATCH -next] mtd: fix nandsim sched.h references Randy Dunlap
2008-12-15 23:38 ` [PATCH -next] mtd: fix nettel printk formats Randy Dunlap

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