Commit 2ac63d90 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Brian Norris

mtd: nand: don't break long print messages

This follows Chapter 2 of Linux's CodingStyle:
> However, never break user-visible strings such as printk messages,
> because that breaks the ability to grep for them.
Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent b7ab610f
...@@ -3936,8 +3936,7 @@ int nand_scan_tail(struct mtd_info *mtd) ...@@ -3936,8 +3936,7 @@ int nand_scan_tail(struct mtd_info *mtd)
case NAND_ECC_HW_OOB_FIRST: case NAND_ECC_HW_OOB_FIRST:
/* Similar to NAND_ECC_HW, but a separate read_page handle */ /* Similar to NAND_ECC_HW, but a separate read_page handle */
if (!ecc->calculate || !ecc->correct || !ecc->hwctl) { if (!ecc->calculate || !ecc->correct || !ecc->hwctl) {
pr_warn("No ECC functions supplied; " pr_warn("No ECC functions supplied; hardware ECC not possible\n");
"hardware ECC not possible\n");
BUG(); BUG();
} }
if (!ecc->read_page) if (!ecc->read_page)
...@@ -3968,8 +3967,7 @@ int nand_scan_tail(struct mtd_info *mtd) ...@@ -3968,8 +3967,7 @@ int nand_scan_tail(struct mtd_info *mtd)
ecc->read_page == nand_read_page_hwecc || ecc->read_page == nand_read_page_hwecc ||
!ecc->write_page || !ecc->write_page ||
ecc->write_page == nand_write_page_hwecc)) { ecc->write_page == nand_write_page_hwecc)) {
pr_warn("No ECC functions supplied; " pr_warn("No ECC functions supplied; hardware ECC not possible\n");
"hardware ECC not possible\n");
BUG(); BUG();
} }
/* Use standard syndrome read/write page function? */ /* Use standard syndrome read/write page function? */
...@@ -3993,9 +3991,8 @@ int nand_scan_tail(struct mtd_info *mtd) ...@@ -3993,9 +3991,8 @@ int nand_scan_tail(struct mtd_info *mtd)
} }
break; break;
} }
pr_warn("%d byte HW ECC not possible on " pr_warn("%d byte HW ECC not possible on %d byte page size, fallback to SW ECC\n",
"%d byte page size, fallback to SW ECC\n", ecc->size, mtd->writesize);
ecc->size, mtd->writesize);
ecc->mode = NAND_ECC_SOFT; ecc->mode = NAND_ECC_SOFT;
case NAND_ECC_SOFT: case NAND_ECC_SOFT:
...@@ -4048,8 +4045,7 @@ int nand_scan_tail(struct mtd_info *mtd) ...@@ -4048,8 +4045,7 @@ int nand_scan_tail(struct mtd_info *mtd)
break; break;
case NAND_ECC_NONE: case NAND_ECC_NONE:
pr_warn("NAND_ECC_NONE selected by board driver. " pr_warn("NAND_ECC_NONE selected by board driver. This is not recommended!\n");
"This is not recommended!\n");
ecc->read_page = nand_read_page_raw; ecc->read_page = nand_read_page_raw;
ecc->write_page = nand_write_page_raw; ecc->write_page = nand_write_page_raw;
ecc->read_oob = nand_read_oob_std; ecc->read_oob = nand_read_oob_std;
......
...@@ -201,12 +201,12 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, ...@@ -201,12 +201,12 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num,
res = mtd_read(mtd, from, len, &retlen, buf); res = mtd_read(mtd, from, len, &retlen, buf);
if (res < 0) { if (res < 0) {
if (mtd_is_eccerr(res)) { if (mtd_is_eccerr(res)) {
pr_info("nand_bbt: ECC error in BBT at " pr_info("nand_bbt: ECC error in BBT at 0x%012llx\n",
"0x%012llx\n", from & ~mtd->writesize); from & ~mtd->writesize);
return res; return res;
} else if (mtd_is_bitflip(res)) { } else if (mtd_is_bitflip(res)) {
pr_info("nand_bbt: corrected error in BBT at " pr_info("nand_bbt: corrected error in BBT at 0x%012llx\n",
"0x%012llx\n", from & ~mtd->writesize); from & ~mtd->writesize);
ret = res; ret = res;
} else { } else {
pr_info("nand_bbt: error reading BBT\n"); pr_info("nand_bbt: error reading BBT\n");
...@@ -580,8 +580,8 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr ...@@ -580,8 +580,8 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
if (td->pages[i] == -1) if (td->pages[i] == -1)
pr_warn("Bad block table not found for chip %d\n", i); pr_warn("Bad block table not found for chip %d\n", i);
else else
pr_info("Bad block table found at page %d, version " pr_info("Bad block table found at page %d, version 0x%02X\n",
"0x%02X\n", td->pages[i], td->version[i]); td->pages[i], td->version[i]);
} }
return 0; return 0;
} }
...@@ -725,12 +725,10 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, ...@@ -725,12 +725,10 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf,
res = mtd_read(mtd, to, len, &retlen, buf); res = mtd_read(mtd, to, len, &retlen, buf);
if (res < 0) { if (res < 0) {
if (retlen != len) { if (retlen != len) {
pr_info("nand_bbt: error reading block " pr_info("nand_bbt: error reading block for writing the bad block table\n");
"for writing the bad block table\n");
return res; return res;
} }
pr_warn("nand_bbt: ECC error while reading " pr_warn("nand_bbt: ECC error while reading block for writing bad block table\n");
"block for writing bad block table\n");
} }
/* Read oob data */ /* Read oob data */
ops.ooblen = (len >> this->page_shift) * mtd->oobsize; ops.ooblen = (len >> this->page_shift) * mtd->oobsize;
...@@ -1338,9 +1336,8 @@ int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) ...@@ -1338,9 +1336,8 @@ int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt)
block = (int)(offs >> this->bbt_erase_shift); block = (int)(offs >> this->bbt_erase_shift);
res = bbt_get_entry(this, block); res = bbt_get_entry(this, block);
pr_debug("nand_isbad_bbt(): bbt info for offs 0x%08x: " pr_debug("nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n",
"(block %d) 0x%02x\n", (unsigned int)offs, block, res);
(unsigned int)offs, block, res);
switch (res) { switch (res) {
case BBT_BLOCK_GOOD: case BBT_BLOCK_GOOD:
......
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