Commit 0a32a102 authored by Brian Norris's avatar Brian Norris Committed by Artem Bityutskiy

mtd: cleanup style on pr_debug messages

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@intel.com>
parent 289c0522
...@@ -440,8 +440,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) ...@@ -440,8 +440,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
mtd->writesize = 1; mtd->writesize = 1;
mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
pr_debug("MTD %s(): write buffer size %d\n", pr_debug("MTD %s(): write buffer size %d\n", __func__,
__func__, mtd->writebufsize); mtd->writebufsize);
mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot; mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot;
...@@ -1798,8 +1798,7 @@ static int do_atmel_lock(struct map_info *map, struct flchip *chip, ...@@ -1798,8 +1798,7 @@ static int do_atmel_lock(struct map_info *map, struct flchip *chip,
goto out_unlock; goto out_unlock;
chip->state = FL_LOCKING; chip->state = FL_LOCKING;
pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len);
__func__, adr, len);
cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,
cfi->device_type, NULL); cfi->device_type, NULL);
...@@ -1834,8 +1833,7 @@ static int do_atmel_unlock(struct map_info *map, struct flchip *chip, ...@@ -1834,8 +1833,7 @@ static int do_atmel_unlock(struct map_info *map, struct flchip *chip,
goto out_unlock; goto out_unlock;
chip->state = FL_UNLOCKING; chip->state = FL_UNLOCKING;
pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", pr_debug("MTD %s(): LOCK 0x%08lx len %d\n", __func__, adr, len);
__func__, adr, len);
cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,
cfi->device_type, NULL); cfi->device_type, NULL);
......
...@@ -208,9 +208,8 @@ static int wait_till_ready(struct m25p *flash) ...@@ -208,9 +208,8 @@ static int wait_till_ready(struct m25p *flash)
*/ */
static int erase_chip(struct m25p *flash) static int erase_chip(struct m25p *flash)
{ {
pr_debug("%s: %s %lldKiB\n", pr_debug("%s: %s %lldKiB\n", dev_name(&flash->spi->dev), __func__,
dev_name(&flash->spi->dev), __func__, (long long)(flash->mtd.size >> 10));
(long long)(flash->mtd.size >> 10));
/* Wait until finished previous write command. */ /* Wait until finished previous write command. */
if (wait_till_ready(flash)) if (wait_till_ready(flash))
...@@ -249,9 +248,8 @@ static int m25p_cmdsz(struct m25p *flash) ...@@ -249,9 +248,8 @@ static int m25p_cmdsz(struct m25p *flash)
*/ */
static int erase_sector(struct m25p *flash, u32 offset) static int erase_sector(struct m25p *flash, u32 offset)
{ {
pr_debug("%s: %s %dKiB at 0x%08x\n", pr_debug("%s: %s %dKiB at 0x%08x\n", dev_name(&flash->spi->dev),
dev_name(&flash->spi->dev), __func__, __func__, flash->mtd.erasesize / 1024, offset);
flash->mtd.erasesize / 1024, offset);
/* Wait until finished previous write command. */ /* Wait until finished previous write command. */
if (wait_till_ready(flash)) if (wait_till_ready(flash))
...@@ -285,9 +283,9 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -285,9 +283,9 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr)
u32 addr,len; u32 addr,len;
uint32_t rem; uint32_t rem;
pr_debug("%s: %s %s 0x%llx, len %lld\n", pr_debug("%s: %s at 0x%llx, len %lld\n", dev_name(&flash->spi->dev),
dev_name(&flash->spi->dev), __func__, "at", __func__, (long long)instr->addr,
(long long)instr->addr, (long long)instr->len); (long long)instr->len);
/* sanity checks */ /* sanity checks */
if (instr->addr + instr->len > flash->mtd.size) 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,9 +345,8 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len,
struct spi_transfer t[2]; struct spi_transfer t[2];
struct spi_message m; struct spi_message m;
pr_debug("%s: %s %s 0x%08x, len %zd\n", pr_debug("%s: %s from 0x%08x, len %zd\n", dev_name(&flash->spi->dev),
dev_name(&flash->spi->dev), __func__, "from", __func__, (u32)from, len);
(u32)from, len);
/* sanity checks */ /* sanity checks */
if (!len) if (!len)
...@@ -416,9 +413,8 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -416,9 +413,8 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
struct spi_transfer t[2]; struct spi_transfer t[2];
struct spi_message m; struct spi_message m;
pr_debug("%s: %s %s 0x%08x, len %zd\n", pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev),
dev_name(&flash->spi->dev), __func__, "to", __func__, (u32)to, len);
(u32)to, len);
*retlen = 0; *retlen = 0;
...@@ -509,9 +505,8 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -509,9 +505,8 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t actual; size_t actual;
int cmd_sz, ret; int cmd_sz, ret;
pr_debug("%s: %s %s 0x%08x, len %zd\n", pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev),
dev_name(&flash->spi->dev), __func__, "to", __func__, (u32)to, len);
(u32)to, len);
*retlen = 0; *retlen = 0;
...@@ -788,7 +783,7 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi) ...@@ -788,7 +783,7 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
tmp = spi_write_then_read(spi, &code, 1, id, 5); tmp = spi_write_then_read(spi, &code, 1, id, 5);
if (tmp < 0) { if (tmp < 0) {
pr_debug("%s: error %d reading JEDEC ID\n", pr_debug("%s: error %d reading JEDEC ID\n",
dev_name(&spi->dev), tmp); dev_name(&spi->dev), tmp);
return ERR_PTR(tmp); return ERR_PTR(tmp);
} }
jedec = id[0]; jedec = id[0];
......
...@@ -249,8 +249,8 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -249,8 +249,8 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
uint8_t *command; uint8_t *command;
int status; int status;
pr_debug("%s: read 0x%x..0x%x\n", pr_debug("%s: read 0x%x..0x%x\n", dev_name(&priv->spi->dev),
dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); (unsigned)from, (unsigned)(from + len));
*retlen = 0; *retlen = 0;
...@@ -384,7 +384,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -384,7 +384,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
status = spi_sync(spi, &msg); status = spi_sync(spi, &msg);
if (status < 0) if (status < 0)
pr_debug("%s: xfer %u -> %d \n", pr_debug("%s: xfer %u -> %d\n",
dev_name(&spi->dev), addr, status); dev_name(&spi->dev), addr, status);
(void) dataflash_waitready(priv->spi); (void) dataflash_waitready(priv->spi);
...@@ -406,7 +406,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -406,7 +406,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
status = spi_sync(spi, &msg); status = spi_sync(spi, &msg);
spi_transfer_del(x + 1); spi_transfer_del(x + 1);
if (status < 0) if (status < 0)
pr_debug("%s: pgm %u/%u -> %d \n", pr_debug("%s: pgm %u/%u -> %d\n",
dev_name(&spi->dev), addr, writelen, status); dev_name(&spi->dev), addr, writelen, status);
(void) dataflash_waitready(priv->spi); (void) dataflash_waitready(priv->spi);
...@@ -426,7 +426,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -426,7 +426,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
status = spi_sync(spi, &msg); status = spi_sync(spi, &msg);
if (status < 0) if (status < 0)
pr_debug("%s: compare %u -> %d \n", pr_debug("%s: compare %u -> %d\n",
dev_name(&spi->dev), addr, status); dev_name(&spi->dev), addr, status);
status = dataflash_waitready(priv->spi); status = dataflash_waitready(priv->spi);
...@@ -906,14 +906,14 @@ static int __devinit dataflash_probe(struct spi_device *spi) ...@@ -906,14 +906,14 @@ static int __devinit dataflash_probe(struct spi_device *spi)
break; break;
/* obsolete AT45DB1282 not (yet?) supported */ /* obsolete AT45DB1282 not (yet?) supported */
default: default:
pr_debug("%s: unsupported device (%x)\n", pr_debug("%s: unsupported device (%x)\n", dev_name(&spi->dev),
dev_name(&spi->dev), status & 0x3c); status & 0x3c);
status = -ENODEV; status = -ENODEV;
} }
if (status < 0) if (status < 0)
pr_debug("%s: add_dataflash --> %d\n", pr_debug("%s: add_dataflash --> %d\n", dev_name(&spi->dev),
dev_name(&spi->dev), status); status);
return status; return status;
} }
......
...@@ -213,16 +213,16 @@ static u16 INFTL_findfreeblock(struct INFTLrecord *inftl, int desperate) ...@@ -213,16 +213,16 @@ static u16 INFTL_findfreeblock(struct INFTLrecord *inftl, int desperate)
u16 pot = inftl->LastFreeEUN; u16 pot = inftl->LastFreeEUN;
int silly = inftl->nb_blocks; int silly = inftl->nb_blocks;
pr_debug("INFTL: INFTL_findfreeblock(inftl=%p," pr_debug("INFTL: INFTL_findfreeblock(inftl=%p,desperate=%d)\n",
"desperate=%d)\n", inftl, desperate); inftl, desperate);
/* /*
* Normally, we force a fold to happen before we run out of free * Normally, we force a fold to happen before we run out of free
* blocks completely. * blocks completely.
*/ */
if (!desperate && inftl->numfreeEUNs < 2) { if (!desperate && inftl->numfreeEUNs < 2) {
pr_debug("INFTL: there are too few free " pr_debug("INFTL: there are too few free EUNs (%d)\n",
"EUNs (%d)\n", inftl->numfreeEUNs); inftl->numfreeEUNs);
return BLOCK_NIL; return BLOCK_NIL;
} }
...@@ -257,8 +257,8 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned ...@@ -257,8 +257,8 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
struct inftl_oob oob; struct inftl_oob oob;
size_t retlen; size_t retlen;
pr_debug("INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d," pr_debug("INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d,pending=%d)\n",
"pending=%d)\n", inftl, thisVUC, pendingblock); inftl, thisVUC, pendingblock);
memset(BlockMap, 0xff, sizeof(BlockMap)); memset(BlockMap, 0xff, sizeof(BlockMap));
memset(BlockDeleted, 0, sizeof(BlockDeleted)); memset(BlockDeleted, 0, sizeof(BlockDeleted));
...@@ -321,8 +321,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned ...@@ -321,8 +321,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
* Chain, and the Erase Unit into which we are supposed to be copying. * Chain, and the Erase Unit into which we are supposed to be copying.
* Go for it. * Go for it.
*/ */
pr_debug("INFTL: folding chain %d into unit %d\n", pr_debug("INFTL: folding chain %d into unit %d\n", thisVUC, targetEUN);
thisVUC, targetEUN);
for (block = 0; block < inftl->EraseSize/SECTORSIZE ; block++) { for (block = 0; block < inftl->EraseSize/SECTORSIZE ; block++) {
unsigned char movebuf[SECTORSIZE]; unsigned char movebuf[SECTORSIZE];
...@@ -353,8 +352,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned ...@@ -353,8 +352,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
(block * SECTORSIZE), SECTORSIZE, (block * SECTORSIZE), SECTORSIZE,
&retlen, movebuf); &retlen, movebuf);
if (ret != -EIO) if (ret != -EIO)
pr_debug("INFTL: error went " pr_debug("INFTL: error went away on retry?\n");
"away on retry?\n");
} }
memset(&oob, 0xff, sizeof(struct inftl_oob)); memset(&oob, 0xff, sizeof(struct inftl_oob));
oob.b.Status = oob.b.Status1 = SECTOR_USED; oob.b.Status = oob.b.Status1 = SECTOR_USED;
...@@ -370,8 +368,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned ...@@ -370,8 +368,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
* is important, by doing oldest first if we crash/reboot then it * is important, by doing oldest first if we crash/reboot then it
* it is relatively simple to clean up the mess). * it is relatively simple to clean up the mess).
*/ */
pr_debug("INFTL: want to erase virtual chain %d\n", pr_debug("INFTL: want to erase virtual chain %d\n", thisVUC);
thisVUC);
for (;;) { for (;;) {
/* Find oldest unit in chain. */ /* Find oldest unit in chain. */
...@@ -482,8 +479,8 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) ...@@ -482,8 +479,8 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block)
size_t retlen; size_t retlen;
int silly, silly2 = 3; int silly, silly2 = 3;
pr_debug("INFTL: INFTL_findwriteunit(inftl=%p," pr_debug("INFTL: INFTL_findwriteunit(inftl=%p,block=%d)\n",
"block=%d)\n", inftl, block); inftl, block);
do { do {
/* /*
...@@ -499,8 +496,8 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) ...@@ -499,8 +496,8 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block)
blockofs, 8, &retlen, (char *)&bci); blockofs, 8, &retlen, (char *)&bci);
status = bci.Status | bci.Status1; status = bci.Status | bci.Status1;
pr_debug("INFTL: status of block %d in " pr_debug("INFTL: status of block %d in EUN %d is %x\n",
"EUN %d is %x\n", block , writeEUN, status); block , writeEUN, status);
switch(status) { switch(status) {
case SECTOR_FREE: case SECTOR_FREE:
...@@ -553,9 +550,9 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) ...@@ -553,9 +550,9 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block)
* Hopefully we free something, lets try again. * Hopefully we free something, lets try again.
* This time we are desperate... * This time we are desperate...
*/ */
pr_debug("INFTL: using desperate==1 " pr_debug("INFTL: using desperate==1 to find free EUN "
"to find free EUN to accommodate write to " "to accommodate write to VUC %d\n",
"VUC %d\n", thisVUC); thisVUC);
writeEUN = INFTL_findfreeblock(inftl, 1); writeEUN = INFTL_findfreeblock(inftl, 1);
if (writeEUN == BLOCK_NIL) { if (writeEUN == BLOCK_NIL) {
/* /*
......
...@@ -385,8 +385,7 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block) ...@@ -385,8 +385,7 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block)
struct mtd_info *mtd = inftl->mbd.mtd; struct mtd_info *mtd = inftl->mbd.mtd;
int physblock; int physblock;
pr_debug("INFTL: INFTL_formatblock(inftl=%p," pr_debug("INFTL: INFTL_formatblock(inftl=%p,block=%d)\n", inftl, block);
"block=%d)\n", inftl, block);
memset(instr, 0, sizeof(struct erase_info)); memset(instr, 0, sizeof(struct erase_info));
......
...@@ -349,8 +349,7 @@ static void wait_op_done(struct mxc_nand_host *host, int useirq) ...@@ -349,8 +349,7 @@ static void wait_op_done(struct mxc_nand_host *host, int useirq)
udelay(1); udelay(1);
} }
if (max_retries < 0) if (max_retries < 0)
pr_debug("%s: INT not set\n", pr_debug("%s: INT not set\n", __func__);
__func__);
} }
} }
...@@ -386,8 +385,7 @@ static void send_cmd_v1_v2(struct mxc_nand_host *host, uint16_t cmd, int useirq) ...@@ -386,8 +385,7 @@ static void send_cmd_v1_v2(struct mxc_nand_host *host, uint16_t cmd, int useirq)
udelay(1); udelay(1);
} }
if (max_retries < 0) if (max_retries < 0)
pr_debug("%s: RESET failed\n", pr_debug("%s: RESET failed\n", __func__);
__func__);
} else { } else {
/* Wait for operation to complete */ /* Wait for operation to complete */
wait_op_done(host, useirq); wait_op_done(host, useirq);
......
...@@ -93,8 +93,8 @@ int nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf, ...@@ -93,8 +93,8 @@ int nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf,
buf[errloc[i] >> 3] ^= (1 << (errloc[i] & 7)); buf[errloc[i] >> 3] ^= (1 << (errloc[i] & 7));
/* else error in ecc, no action needed */ /* else error in ecc, no action needed */
pr_debug("%s: corrected bitflip %u\n", pr_debug("%s: corrected bitflip %u\n", __func__,
__func__, errloc[i]); errloc[i]);
} }
} else if (count < 0) { } else if (count < 0) {
printk(KERN_ERR "ecc unrecoverable error\n"); printk(KERN_ERR "ecc unrecoverable error\n");
......
...@@ -763,8 +763,8 @@ static int omap_compare_ecc(u8 *ecc_data1, /* read from NAND memory */ ...@@ -763,8 +763,8 @@ static int omap_compare_ecc(u8 *ecc_data1, /* read from NAND memory */
find_bit = (ecc_bit[5] << 2) + (ecc_bit[3] << 1) + ecc_bit[1]; find_bit = (ecc_bit[5] << 2) + (ecc_bit[3] << 1) + ecc_bit[1];
pr_debug("Correcting single bit ECC error at " pr_debug("Correcting single bit ECC error at offset: "
"offset: %d, bit: %d\n", find_byte, find_bit); "%d, bit: %d\n", find_byte, find_bit);
page_data[find_byte] ^= (1 << find_bit); page_data[find_byte] ^= (1 << find_bit);
......
...@@ -1122,8 +1122,8 @@ static int onenand_mlc_read_ops_nolock(struct mtd_info *mtd, loff_t from, ...@@ -1122,8 +1122,8 @@ static int onenand_mlc_read_ops_nolock(struct mtd_info *mtd, loff_t from,
int ret = 0; int ret = 0;
int writesize = this->writesize; int writesize = this->writesize;
pr_debug("%s: from = 0x%08x, len = %i\n", pr_debug("%s: from = 0x%08x, len = %i\n", __func__, (unsigned int)from,
__func__, (unsigned int) from, (int) len); (int)len);
if (ops->mode == MTD_OOB_AUTO) if (ops->mode == MTD_OOB_AUTO)
oobsize = this->ecclayout->oobavail; oobsize = this->ecclayout->oobavail;
...@@ -1226,8 +1226,8 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from, ...@@ -1226,8 +1226,8 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from,
int ret = 0, boundary = 0; int ret = 0, boundary = 0;
int writesize = this->writesize; int writesize = this->writesize;
pr_debug("%s: from = 0x%08x, len = %i\n", pr_debug("%s: from = 0x%08x, len = %i\n", __func__, (unsigned int)from,
__func__, (unsigned int) from, (int) len); (int)len);
if (ops->mode == MTD_OOB_AUTO) if (ops->mode == MTD_OOB_AUTO)
oobsize = this->ecclayout->oobavail; oobsize = this->ecclayout->oobavail;
...@@ -1357,8 +1357,8 @@ static int onenand_read_oob_nolock(struct mtd_info *mtd, loff_t from, ...@@ -1357,8 +1357,8 @@ static int onenand_read_oob_nolock(struct mtd_info *mtd, loff_t from,
from += ops->ooboffs; from += ops->ooboffs;
pr_debug("%s: from = 0x%08x, len = %i\n", pr_debug("%s: from = 0x%08x, len = %i\n", __func__, (unsigned int)from,
__func__, (unsigned int) from, (int) len); (int)len);
/* Initialize return length value */ /* Initialize return length value */
ops->oobretlen = 0; ops->oobretlen = 0;
...@@ -1576,8 +1576,8 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from, ...@@ -1576,8 +1576,8 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from,
size_t len = ops->ooblen; size_t len = ops->ooblen;
u_char *buf = ops->oobbuf; u_char *buf = ops->oobbuf;
pr_debug("%s: from = 0x%08x, len = %zi\n", pr_debug("%s: from = 0x%08x, len = %zi\n", __func__, (unsigned int)from,
__func__, (unsigned int) from, len); len);
/* Initialize return value */ /* Initialize return value */
ops->oobretlen = 0; ops->oobretlen = 0;
...@@ -1750,8 +1750,8 @@ static int onenand_panic_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -1750,8 +1750,8 @@ static int onenand_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
/* Wait for any existing operation to clear */ /* Wait for any existing operation to clear */
onenand_panic_wait(mtd); onenand_panic_wait(mtd);
pr_debug("%s: to = 0x%08x, len = %i\n", pr_debug("%s: to = 0x%08x, len = %i\n", __func__, (unsigned int)to,
__func__, (unsigned int) to, (int) len); (int)len);
/* Initialize retlen, in case of early exit */ /* Initialize retlen, in case of early exit */
*retlen = 0; *retlen = 0;
...@@ -1883,8 +1883,8 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to, ...@@ -1883,8 +1883,8 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
u_char *oobbuf; u_char *oobbuf;
int ret = 0, cmd; int ret = 0, cmd;
pr_debug("%s: to = 0x%08x, len = %i\n", pr_debug("%s: to = 0x%08x, len = %i\n", __func__, (unsigned int)to,
__func__, (unsigned int) to, (int) len); (int)len);
/* Initialize retlen, in case of early exit */ /* Initialize retlen, in case of early exit */
ops->retlen = 0; ops->retlen = 0;
...@@ -2078,8 +2078,8 @@ static int onenand_write_oob_nolock(struct mtd_info *mtd, loff_t to, ...@@ -2078,8 +2078,8 @@ static int onenand_write_oob_nolock(struct mtd_info *mtd, loff_t to,
to += ops->ooboffs; to += ops->ooboffs;
pr_debug("%s: to = 0x%08x, len = %i\n", pr_debug("%s: to = 0x%08x, len = %i\n", __func__, (unsigned int)to,
__func__, (unsigned int) to, (int) len); (int)len);
/* Initialize retlen, in case of early exit */ /* Initialize retlen, in case of early exit */
ops->oobretlen = 0; ops->oobretlen = 0;
...@@ -2490,7 +2490,8 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -2490,7 +2490,8 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
loff_t region_offset = 0; loff_t region_offset = 0;
pr_debug("%s: start=0x%012llx, len=%llu\n", __func__, pr_debug("%s: start=0x%012llx, len=%llu\n", __func__,
(unsigned long long) instr->addr, (unsigned long long) instr->len); (unsigned long long)instr->addr,
(unsigned long long)instr->len);
/* Do not allow erase past end of device */ /* Do not allow erase past end of device */
if (unlikely((len + addr) > mtd->size)) { if (unlikely((len + addr) > mtd->size)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment