Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: cleanup style on pr_debug messages

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>

authored by

Brian Norris and committed by
Artem Bityutskiy
0a32a102 289c0522

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