aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-07-19 13:06:10 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 08:02:16 -0400
commit0a32a10264d151bc2d1616d69edaf915aa728698 (patch)
treeb31eeb9c6c177fc58c848c6a993f961ea2506858 /drivers/mtd
parent289c05222172b51401dbbb017115655f241d94ab (diff)
mtd: cleanup style on pr_debug messages
Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c10
-rw-r--r--drivers/mtd/devices/m25p80.c33
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c18
-rw-r--r--drivers/mtd/inftlcore.c35
-rw-r--r--drivers/mtd/inftlmount.c3
-rw-r--r--drivers/mtd/nand/mxc_nand.c6
-rw-r--r--drivers/mtd/nand/nand_bch.c4
-rw-r--r--drivers/mtd/nand/omap2.c4
-rw-r--r--drivers/mtd/onenand/onenand_base.c31
9 files changed, 66 insertions, 78 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 2302cc00b4a9..8d70895a58d6 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -440,8 +440,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
440 mtd->writesize = 1; 440 mtd->writesize = 1;
441 mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; 441 mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
442 442
443 pr_debug("MTD %s(): write buffer size %d\n", 443 pr_debug("MTD %s(): write buffer size %d\n", __func__,
444 __func__, mtd->writebufsize); 444 mtd->writebufsize);
445 445
446 mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot; 446 mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot;
447 447
@@ -1798,8 +1798,7 @@ static int do_atmel_lock(struct map_info *map, struct flchip *chip,
1798 goto out_unlock; 1798 goto out_unlock;
1799 chip->state = FL_LOCKING; 1799 chip->state = FL_LOCKING;
1800 1800
1801 pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", 1801 pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len);
1802 __func__, adr, len);
1803 1802
1804 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, 1803 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,
1805 cfi->device_type, NULL); 1804 cfi->device_type, NULL);
@@ -1834,8 +1833,7 @@ static int do_atmel_unlock(struct map_info *map, struct flchip *chip,
1834 goto out_unlock; 1833 goto out_unlock;
1835 chip->state = FL_UNLOCKING; 1834 chip->state = FL_UNLOCKING;
1836 1835
1837 pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", 1836 pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len);
1838 __func__, adr, len);
1839 1837
1840 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, 1838 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,
1841 cfi->device_type, NULL); 1839 cfi->device_type, NULL);
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 6417bd6b36ff..e6ba034c45bc 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -208,9 +208,8 @@ static int wait_till_ready(struct m25p *flash)
208 */ 208 */
209static int erase_chip(struct m25p *flash) 209static int erase_chip(struct m25p *flash)
210{ 210{
211 pr_debug("%s: %s %lldKiB\n", 211 pr_debug("%s: %s %lldKiB\n", dev_name(&flash->spi->dev), __func__,
212 dev_name(&flash->spi->dev), __func__, 212 (long long)(flash->mtd.size >> 10));
213 (long long)(flash->mtd.size >> 10));
214 213
215 /* Wait until finished previous write command. */ 214 /* Wait until finished previous write command. */
216 if (wait_till_ready(flash)) 215 if (wait_till_ready(flash))
@@ -249,9 +248,8 @@ static int m25p_cmdsz(struct m25p *flash)
249 */ 248 */
250static int erase_sector(struct m25p *flash, u32 offset) 249static int erase_sector(struct m25p *flash, u32 offset)
251{ 250{
252 pr_debug("%s: %s %dKiB at 0x%08x\n", 251 pr_debug("%s: %s %dKiB at 0x%08x\n", dev_name(&flash->spi->dev),
253 dev_name(&flash->spi->dev), __func__, 252 __func__, flash->mtd.erasesize / 1024, offset);
254 flash->mtd.erasesize / 1024, offset);
255 253
256 /* Wait until finished previous write command. */ 254 /* Wait until finished previous write command. */
257 if (wait_till_ready(flash)) 255 if (wait_till_ready(flash))
@@ -285,9 +283,9 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr)
285 u32 addr,len; 283 u32 addr,len;
286 uint32_t rem; 284 uint32_t rem;
287 285
288 pr_debug("%s: %s %s 0x%llx, len %lld\n", 286 pr_debug("%s: %s at 0x%llx, len %lld\n", dev_name(&flash->spi->dev),
289 dev_name(&flash->spi->dev), __func__, "at", 287 __func__, (long long)instr->addr,
290 (long long)instr->addr, (long long)instr->len); 288 (long long)instr->len);
291 289
292 /* sanity checks */ 290 /* sanity checks */
293 if (instr->addr + instr->len > flash->mtd.size) 291 if (instr->addr + instr->len > flash->mtd.size)
@@ -347,9 +345,8 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len,
347 struct spi_transfer t[2]; 345 struct spi_transfer t[2];
348 struct spi_message m; 346 struct spi_message m;
349 347
350 pr_debug("%s: %s %s 0x%08x, len %zd\n", 348 pr_debug("%s: %s from 0x%08x, len %zd\n", dev_name(&flash->spi->dev),
351 dev_name(&flash->spi->dev), __func__, "from", 349 __func__, (u32)from, len);
352 (u32)from, len);
353 350
354 /* sanity checks */ 351 /* sanity checks */
355 if (!len) 352 if (!len)
@@ -416,9 +413,8 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
416 struct spi_transfer t[2]; 413 struct spi_transfer t[2];
417 struct spi_message m; 414 struct spi_message m;
418 415
419 pr_debug("%s: %s %s 0x%08x, len %zd\n", 416 pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev),
420 dev_name(&flash->spi->dev), __func__, "to", 417 __func__, (u32)to, len);
421 (u32)to, len);
422 418
423 *retlen = 0; 419 *retlen = 0;
424 420
@@ -509,9 +505,8 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len,
509 size_t actual; 505 size_t actual;
510 int cmd_sz, ret; 506 int cmd_sz, ret;
511 507
512 pr_debug("%s: %s %s 0x%08x, len %zd\n", 508 pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev),
513 dev_name(&flash->spi->dev), __func__, "to", 509 __func__, (u32)to, len);
514 (u32)to, len);
515 510
516 *retlen = 0; 511 *retlen = 0;
517 512
@@ -788,7 +783,7 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
788 tmp = spi_write_then_read(spi, &code, 1, id, 5); 783 tmp = spi_write_then_read(spi, &code, 1, id, 5);
789 if (tmp < 0) { 784 if (tmp < 0) {
790 pr_debug("%s: error %d reading JEDEC ID\n", 785 pr_debug("%s: error %d reading JEDEC ID\n",
791 dev_name(&spi->dev), tmp); 786 dev_name(&spi->dev), tmp);
792 return ERR_PTR(tmp); 787 return ERR_PTR(tmp);
793 } 788 }
794 jedec = id[0]; 789 jedec = id[0];
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index f409aef58ed2..d75c7af18a63 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -249,8 +249,8 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
249 uint8_t *command; 249 uint8_t *command;
250 int status; 250 int status;
251 251
252 pr_debug("%s: read 0x%x..0x%x\n", 252 pr_debug("%s: read 0x%x..0x%x\n", dev_name(&priv->spi->dev),
253 dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); 253 (unsigned)from, (unsigned)(from + len));
254 254
255 *retlen = 0; 255 *retlen = 0;
256 256
@@ -384,7 +384,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
384 384
385 status = spi_sync(spi, &msg); 385 status = spi_sync(spi, &msg);
386 if (status < 0) 386 if (status < 0)
387 pr_debug("%s: xfer %u -> %d \n", 387 pr_debug("%s: xfer %u -> %d\n",
388 dev_name(&spi->dev), addr, status); 388 dev_name(&spi->dev), addr, status);
389 389
390 (void) dataflash_waitready(priv->spi); 390 (void) dataflash_waitready(priv->spi);
@@ -406,7 +406,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
406 status = spi_sync(spi, &msg); 406 status = spi_sync(spi, &msg);
407 spi_transfer_del(x + 1); 407 spi_transfer_del(x + 1);
408 if (status < 0) 408 if (status < 0)
409 pr_debug("%s: pgm %u/%u -> %d \n", 409 pr_debug("%s: pgm %u/%u -> %d\n",
410 dev_name(&spi->dev), addr, writelen, status); 410 dev_name(&spi->dev), addr, writelen, status);
411 411
412 (void) dataflash_waitready(priv->spi); 412 (void) dataflash_waitready(priv->spi);
@@ -426,7 +426,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
426 426
427 status = spi_sync(spi, &msg); 427 status = spi_sync(spi, &msg);
428 if (status < 0) 428 if (status < 0)
429 pr_debug("%s: compare %u -> %d \n", 429 pr_debug("%s: compare %u -> %d\n",
430 dev_name(&spi->dev), addr, status); 430 dev_name(&spi->dev), addr, status);
431 431
432 status = dataflash_waitready(priv->spi); 432 status = dataflash_waitready(priv->spi);
@@ -906,14 +906,14 @@ static int __devinit dataflash_probe(struct spi_device *spi)
906 break; 906 break;
907 /* obsolete AT45DB1282 not (yet?) supported */ 907 /* obsolete AT45DB1282 not (yet?) supported */
908 default: 908 default:
909 pr_debug("%s: unsupported device (%x)\n", 909 pr_debug("%s: unsupported device (%x)\n", dev_name(&spi->dev),
910 dev_name(&spi->dev), status & 0x3c); 910 status & 0x3c);
911 status = -ENODEV; 911 status = -ENODEV;
912 } 912 }
913 913
914 if (status < 0) 914 if (status < 0)
915 pr_debug("%s: add_dataflash --> %d\n", 915 pr_debug("%s: add_dataflash --> %d\n", dev_name(&spi->dev),
916 dev_name(&spi->dev), status); 916 status);
917 917
918 return status; 918 return status;
919} 919}
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
index 232e11b1526c..21aa981e42cd 100644
--- a/drivers/mtd/inftlcore.c
+++ b/drivers/mtd/inftlcore.c
@@ -213,16 +213,16 @@ static u16 INFTL_findfreeblock(struct INFTLrecord *inftl, int desperate)
213 u16 pot = inftl->LastFreeEUN; 213 u16 pot = inftl->LastFreeEUN;
214 int silly = inftl->nb_blocks; 214 int silly = inftl->nb_blocks;
215 215
216 pr_debug("INFTL: INFTL_findfreeblock(inftl=%p," 216 pr_debug("INFTL: INFTL_findfreeblock(inftl=%p,desperate=%d)\n",
217 "desperate=%d)\n", inftl, desperate); 217 inftl, desperate);
218 218
219 /* 219 /*
220 * Normally, we force a fold to happen before we run out of free 220 * Normally, we force a fold to happen before we run out of free
221 * blocks completely. 221 * blocks completely.
222 */ 222 */
223 if (!desperate && inftl->numfreeEUNs < 2) { 223 if (!desperate && inftl->numfreeEUNs < 2) {
224 pr_debug("INFTL: there are too few free " 224 pr_debug("INFTL: there are too few free EUNs (%d)\n",
225 "EUNs (%d)\n", inftl->numfreeEUNs); 225 inftl->numfreeEUNs);
226 return BLOCK_NIL; 226 return BLOCK_NIL;
227 } 227 }
228 228
@@ -257,8 +257,8 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
257 struct inftl_oob oob; 257 struct inftl_oob oob;
258 size_t retlen; 258 size_t retlen;
259 259
260 pr_debug("INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d," 260 pr_debug("INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d,pending=%d)\n",
261 "pending=%d)\n", inftl, thisVUC, pendingblock); 261 inftl, thisVUC, pendingblock);
262 262
263 memset(BlockMap, 0xff, sizeof(BlockMap)); 263 memset(BlockMap, 0xff, sizeof(BlockMap));
264 memset(BlockDeleted, 0, sizeof(BlockDeleted)); 264 memset(BlockDeleted, 0, sizeof(BlockDeleted));
@@ -321,8 +321,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
321 * Chain, and the Erase Unit into which we are supposed to be copying. 321 * Chain, and the Erase Unit into which we are supposed to be copying.
322 * Go for it. 322 * Go for it.
323 */ 323 */
324 pr_debug("INFTL: folding chain %d into unit %d\n", 324 pr_debug("INFTL: folding chain %d into unit %d\n", thisVUC, targetEUN);
325 thisVUC, targetEUN);
326 325
327 for (block = 0; block < inftl->EraseSize/SECTORSIZE ; block++) { 326 for (block = 0; block < inftl->EraseSize/SECTORSIZE ; block++) {
328 unsigned char movebuf[SECTORSIZE]; 327 unsigned char movebuf[SECTORSIZE];
@@ -353,8 +352,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
353 (block * SECTORSIZE), SECTORSIZE, 352 (block * SECTORSIZE), SECTORSIZE,
354 &retlen, movebuf); 353 &retlen, movebuf);
355 if (ret != -EIO) 354 if (ret != -EIO)
356 pr_debug("INFTL: error went " 355 pr_debug("INFTL: error went away on retry?\n");
357 "away on retry?\n");
358 } 356 }
359 memset(&oob, 0xff, sizeof(struct inftl_oob)); 357 memset(&oob, 0xff, sizeof(struct inftl_oob));
360 oob.b.Status = oob.b.Status1 = SECTOR_USED; 358 oob.b.Status = oob.b.Status1 = SECTOR_USED;
@@ -370,8 +368,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
370 * is important, by doing oldest first if we crash/reboot then it 368 * is important, by doing oldest first if we crash/reboot then it
371 * it is relatively simple to clean up the mess). 369 * it is relatively simple to clean up the mess).
372 */ 370 */
373 pr_debug("INFTL: want to erase virtual chain %d\n", 371 pr_debug("INFTL: want to erase virtual chain %d\n", thisVUC);
374 thisVUC);
375 372
376 for (;;) { 373 for (;;) {
377 /* Find oldest unit in chain. */ 374 /* Find oldest unit in chain. */
@@ -482,8 +479,8 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block)
482 size_t retlen; 479 size_t retlen;
483 int silly, silly2 = 3; 480 int silly, silly2 = 3;
484 481
485 pr_debug("INFTL: INFTL_findwriteunit(inftl=%p," 482 pr_debug("INFTL: INFTL_findwriteunit(inftl=%p,block=%d)\n",
486 "block=%d)\n", inftl, block); 483 inftl, block);
487 484
488 do { 485 do {
489 /* 486 /*
@@ -499,8 +496,8 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block)
499 blockofs, 8, &retlen, (char *)&bci); 496 blockofs, 8, &retlen, (char *)&bci);
500 497
501 status = bci.Status | bci.Status1; 498 status = bci.Status | bci.Status1;
502 pr_debug("INFTL: status of block %d in " 499 pr_debug("INFTL: status of block %d in EUN %d is %x\n",
503 "EUN %d is %x\n", block , writeEUN, status); 500 block , writeEUN, status);
504 501
505 switch(status) { 502 switch(status) {
506 case SECTOR_FREE: 503 case SECTOR_FREE:
@@ -553,9 +550,9 @@ hitused:
553 * Hopefully we free something, lets try again. 550 * Hopefully we free something, lets try again.
554 * This time we are desperate... 551 * This time we are desperate...
555 */ 552 */
556 pr_debug("INFTL: using desperate==1 " 553 pr_debug("INFTL: using desperate==1 to find free EUN "
557 "to find free EUN to accommodate write to " 554 "to accommodate write to VUC %d\n",
558 "VUC %d\n", thisVUC); 555 thisVUC);
559 writeEUN = INFTL_findfreeblock(inftl, 1); 556 writeEUN = INFTL_findfreeblock(inftl, 1);
560 if (writeEUN == BLOCK_NIL) { 557 if (writeEUN == BLOCK_NIL) {
561 /* 558 /*
diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c
index d969c2d5d62b..bd82b04ec8f2 100644
--- a/drivers/mtd/inftlmount.c
+++ b/drivers/mtd/inftlmount.c
@@ -385,8 +385,7 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block)
385 struct mtd_info *mtd = inftl->mbd.mtd; 385 struct mtd_info *mtd = inftl->mbd.mtd;
386 int physblock; 386 int physblock;
387 387
388 pr_debug("INFTL: INFTL_formatblock(inftl=%p," 388 pr_debug("INFTL: INFTL_formatblock(inftl=%p,block=%d)\n", inftl, block);
389 "block=%d)\n", inftl, block);
390 389
391 memset(instr, 0, sizeof(struct erase_info)); 390 memset(instr, 0, sizeof(struct erase_info));
392 391
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 2fbfb71c237b..ebeb84316ecd 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -349,8 +349,7 @@ static void wait_op_done(struct mxc_nand_host *host, int useirq)
349 udelay(1); 349 udelay(1);
350 } 350 }
351 if (max_retries < 0) 351 if (max_retries < 0)
352 pr_debug("%s: INT not set\n", 352 pr_debug("%s: INT not set\n", __func__);
353 __func__);
354 } 353 }
355} 354}
356 355
@@ -386,8 +385,7 @@ static void send_cmd_v1_v2(struct mxc_nand_host *host, uint16_t cmd, int useirq)
386 udelay(1); 385 udelay(1);
387 } 386 }
388 if (max_retries < 0) 387 if (max_retries < 0)
389 pr_debug("%s: RESET failed\n", 388 pr_debug("%s: RESET failed\n", __func__);
390 __func__);
391 } else { 389 } else {
392 /* Wait for operation to complete */ 390 /* Wait for operation to complete */
393 wait_op_done(host, useirq); 391 wait_op_done(host, useirq);
diff --git a/drivers/mtd/nand/nand_bch.c b/drivers/mtd/nand/nand_bch.c
index 16cca9b99052..3803e0bba23b 100644
--- a/drivers/mtd/nand/nand_bch.c
+++ b/drivers/mtd/nand/nand_bch.c
@@ -93,8 +93,8 @@ int nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf,
93 buf[errloc[i] >> 3] ^= (1 << (errloc[i] & 7)); 93 buf[errloc[i] >> 3] ^= (1 << (errloc[i] & 7));
94 /* else error in ecc, no action needed */ 94 /* else error in ecc, no action needed */
95 95
96 pr_debug("%s: corrected bitflip %u\n", 96 pr_debug("%s: corrected bitflip %u\n", __func__,
97 __func__, errloc[i]); 97 errloc[i]);
98 } 98 }
99 } else if (count < 0) { 99 } else if (count < 0) {
100 printk(KERN_ERR "ecc unrecoverable error\n"); 100 printk(KERN_ERR "ecc unrecoverable error\n");
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 81e6bc0c9048..19b283f2c80c 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -763,8 +763,8 @@ static int omap_compare_ecc(u8 *ecc_data1, /* read from NAND memory */
763 763
764 find_bit = (ecc_bit[5] << 2) + (ecc_bit[3] << 1) + ecc_bit[1]; 764 find_bit = (ecc_bit[5] << 2) + (ecc_bit[3] << 1) + ecc_bit[1];
765 765
766 pr_debug("Correcting single bit ECC error at " 766 pr_debug("Correcting single bit ECC error at offset: "
767 "offset: %d, bit: %d\n", find_byte, find_bit); 767 "%d, bit: %d\n", find_byte, find_bit);
768 768
769 page_data[find_byte] ^= (1 << find_bit); 769 page_data[find_byte] ^= (1 << find_bit);
770 770
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index b07b05259c92..de98791f8101 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1122,8 +1122,8 @@ static int onenand_mlc_read_ops_nolock(struct mtd_info *mtd, loff_t from,
1122 int ret = 0; 1122 int ret = 0;
1123 int writesize = this->writesize; 1123 int writesize = this->writesize;
1124 1124
1125 pr_debug("%s: from = 0x%08x, len = %i\n", 1125 pr_debug("%s: from = 0x%08x, len = %i\n", __func__, (unsigned int)from,
1126 __func__, (unsigned int) from, (int) len); 1126 (int)len);
1127 1127
1128 if (ops->mode == MTD_OOB_AUTO) 1128 if (ops->mode == MTD_OOB_AUTO)
1129 oobsize = this->ecclayout->oobavail; 1129 oobsize = this->ecclayout->oobavail;
@@ -1226,8 +1226,8 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from,
1226 int ret = 0, boundary = 0; 1226 int ret = 0, boundary = 0;
1227 int writesize = this->writesize; 1227 int writesize = this->writesize;
1228 1228
1229 pr_debug("%s: from = 0x%08x, len = %i\n", 1229 pr_debug("%s: from = 0x%08x, len = %i\n", __func__, (unsigned int)from,
1230 __func__, (unsigned int) from, (int) len); 1230 (int)len);
1231 1231
1232 if (ops->mode == MTD_OOB_AUTO) 1232 if (ops->mode == MTD_OOB_AUTO)
1233 oobsize = this->ecclayout->oobavail; 1233 oobsize = this->ecclayout->oobavail;
@@ -1357,8 +1357,8 @@ static int onenand_read_oob_nolock(struct mtd_info *mtd, loff_t from,
1357 1357
1358 from += ops->ooboffs; 1358 from += ops->ooboffs;
1359 1359
1360 pr_debug("%s: from = 0x%08x, len = %i\n", 1360 pr_debug("%s: from = 0x%08x, len = %i\n", __func__, (unsigned int)from,
1361 __func__, (unsigned int) from, (int) len); 1361 (int)len);
1362 1362
1363 /* Initialize return length value */ 1363 /* Initialize return length value */
1364 ops->oobretlen = 0; 1364 ops->oobretlen = 0;
@@ -1576,8 +1576,8 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from,
1576 size_t len = ops->ooblen; 1576 size_t len = ops->ooblen;
1577 u_char *buf = ops->oobbuf; 1577 u_char *buf = ops->oobbuf;
1578 1578
1579 pr_debug("%s: from = 0x%08x, len = %zi\n", 1579 pr_debug("%s: from = 0x%08x, len = %zi\n", __func__, (unsigned int)from,
1580 __func__, (unsigned int) from, len); 1580 len);
1581 1581
1582 /* Initialize return value */ 1582 /* Initialize return value */
1583 ops->oobretlen = 0; 1583 ops->oobretlen = 0;
@@ -1750,8 +1750,8 @@ static int onenand_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
1750 /* Wait for any existing operation to clear */ 1750 /* Wait for any existing operation to clear */
1751 onenand_panic_wait(mtd); 1751 onenand_panic_wait(mtd);
1752 1752
1753 pr_debug("%s: to = 0x%08x, len = %i\n", 1753 pr_debug("%s: to = 0x%08x, len = %i\n", __func__, (unsigned int)to,
1754 __func__, (unsigned int) to, (int) len); 1754 (int)len);
1755 1755
1756 /* Initialize retlen, in case of early exit */ 1756 /* Initialize retlen, in case of early exit */
1757 *retlen = 0; 1757 *retlen = 0;
@@ -1883,8 +1883,8 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
1883 u_char *oobbuf; 1883 u_char *oobbuf;
1884 int ret = 0, cmd; 1884 int ret = 0, cmd;
1885 1885
1886 pr_debug("%s: to = 0x%08x, len = %i\n", 1886 pr_debug("%s: to = 0x%08x, len = %i\n", __func__, (unsigned int)to,
1887 __func__, (unsigned int) to, (int) len); 1887 (int)len);
1888 1888
1889 /* Initialize retlen, in case of early exit */ 1889 /* Initialize retlen, in case of early exit */
1890 ops->retlen = 0; 1890 ops->retlen = 0;
@@ -2078,8 +2078,8 @@ static int onenand_write_oob_nolock(struct mtd_info *mtd, loff_t to,
2078 2078
2079 to += ops->ooboffs; 2079 to += ops->ooboffs;
2080 2080
2081 pr_debug("%s: to = 0x%08x, len = %i\n", 2081 pr_debug("%s: to = 0x%08x, len = %i\n", __func__, (unsigned int)to,
2082 __func__, (unsigned int) to, (int) len); 2082 (int)len);
2083 2083
2084 /* Initialize retlen, in case of early exit */ 2084 /* Initialize retlen, in case of early exit */
2085 ops->oobretlen = 0; 2085 ops->oobretlen = 0;
@@ -2490,7 +2490,8 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
2490 loff_t region_offset = 0; 2490 loff_t region_offset = 0;
2491 2491
2492 pr_debug("%s: start=0x%012llx, len=%llu\n", __func__, 2492 pr_debug("%s: start=0x%012llx, len=%llu\n", __func__,
2493 (unsigned long long) instr->addr, (unsigned long long) instr->len); 2493 (unsigned long long)instr->addr,
2494 (unsigned long long)instr->len);
2494 2495
2495 /* Do not allow erase past end of device */ 2496 /* Do not allow erase past end of device */
2496 if (unlikely((len + addr) > mtd->size)) { 2497 if (unlikely((len + addr) > mtd->size)) {