diff options
author | Brian Norris <computersforpeace@gmail.com> | 2011-07-19 13:06:08 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 08:02:15 -0400 |
commit | d037021953922ebdbc34b98b8c4648017b1c6e89 (patch) | |
tree | 9e15bda200d8df94bfb73a8a278f964a8f904c3b /drivers/mtd/nand | |
parent | 9a4d4d69018e7b719ba58fa30fcdd60e547776b8 (diff) |
mtd: nand: style fixups in pr_* messages
This is a cleanup of some punctuation, indentation, and capitalization
on the lines affected affected by the last patch.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 49 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_bbt.c | 41 |
2 files changed, 42 insertions, 48 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 1d6c81aef779..6a5271256245 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -2179,8 +2179,8 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to, | |||
2179 | 2179 | ||
2180 | /* Reject writes, which are not page aligned */ | 2180 | /* Reject writes, which are not page aligned */ |
2181 | if (NOTALIGNED(to) || NOTALIGNED(ops->len)) { | 2181 | if (NOTALIGNED(to) || NOTALIGNED(ops->len)) { |
2182 | pr_notice("%s: Attempt to write not " | 2182 | pr_notice("%s: attempt to write non page aligned data\n", |
2183 | "page aligned data\n", __func__); | 2183 | __func__); |
2184 | return -EINVAL; | 2184 | return -EINVAL; |
2185 | } | 2185 | } |
2186 | 2186 | ||
@@ -2570,8 +2570,8 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, | |||
2570 | /* Heck if we have a bad block, we do not erase bad blocks! */ | 2570 | /* Heck if we have a bad block, we do not erase bad blocks! */ |
2571 | if (nand_block_checkbad(mtd, ((loff_t) page) << | 2571 | if (nand_block_checkbad(mtd, ((loff_t) page) << |
2572 | chip->page_shift, 0, allowbbt)) { | 2572 | chip->page_shift, 0, allowbbt)) { |
2573 | pr_warn("%s: attempt to erase a bad block " | 2573 | pr_warn("%s: attempt to erase a bad block at page 0x%08x\n", |
2574 | "at page 0x%08x\n", __func__, page); | 2574 | __func__, page); |
2575 | instr->state = MTD_ERASE_FAILED; | 2575 | instr->state = MTD_ERASE_FAILED; |
2576 | goto erase_exit; | 2576 | goto erase_exit; |
2577 | } | 2577 | } |
@@ -2744,8 +2744,8 @@ static void nand_resume(struct mtd_info *mtd) | |||
2744 | if (chip->state == FL_PM_SUSPENDED) | 2744 | if (chip->state == FL_PM_SUSPENDED) |
2745 | nand_release_device(mtd); | 2745 | nand_release_device(mtd); |
2746 | else | 2746 | else |
2747 | pr_err("%s called for a chip which is not " | 2747 | pr_err("%s called for a chip which is not in suspended state\n", |
2748 | "in suspended state\n", __func__); | 2748 | __func__); |
2749 | } | 2749 | } |
2750 | 2750 | ||
2751 | /* Set default functions */ | 2751 | /* Set default functions */ |
@@ -2866,8 +2866,7 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, | |||
2866 | chip->onfi_version = 0; | 2866 | chip->onfi_version = 0; |
2867 | 2867 | ||
2868 | if (!chip->onfi_version) { | 2868 | if (!chip->onfi_version) { |
2869 | pr_info("%s: unsupported ONFI version: %d\n", | 2869 | pr_info("%s: unsupported ONFI version: %d\n", __func__, val); |
2870 | __func__, val); | ||
2871 | return 0; | 2870 | return 0; |
2872 | } | 2871 | } |
2873 | 2872 | ||
@@ -2933,8 +2932,8 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, | |||
2933 | 2932 | ||
2934 | if (id_data[0] != *maf_id || id_data[1] != *dev_id) { | 2933 | if (id_data[0] != *maf_id || id_data[1] != *dev_id) { |
2935 | pr_info("%s: second ID read did not match " | 2934 | pr_info("%s: second ID read did not match " |
2936 | "%02x,%02x against %02x,%02x\n", __func__, | 2935 | "%02x,%02x against %02x,%02x\n", __func__, |
2937 | *maf_id, *dev_id, id_data[0], id_data[1]); | 2936 | *maf_id, *dev_id, id_data[0], id_data[1]); |
2938 | return ERR_PTR(-ENODEV); | 2937 | return ERR_PTR(-ENODEV); |
2939 | } | 2938 | } |
2940 | 2939 | ||
@@ -3078,11 +3077,11 @@ ident_done: | |||
3078 | */ | 3077 | */ |
3079 | if (busw != (chip->options & NAND_BUSWIDTH_16)) { | 3078 | if (busw != (chip->options & NAND_BUSWIDTH_16)) { |
3080 | pr_info("NAND device: Manufacturer ID:" | 3079 | pr_info("NAND device: Manufacturer ID:" |
3081 | " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, | 3080 | " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, |
3082 | *dev_id, nand_manuf_ids[maf_idx].name, mtd->name); | 3081 | *dev_id, nand_manuf_ids[maf_idx].name, mtd->name); |
3083 | pr_warn("NAND bus width %d instead %d bit\n", | 3082 | pr_warn("NAND bus width %d instead %d bit\n", |
3084 | (chip->options & NAND_BUSWIDTH_16) ? 16 : 8, | 3083 | (chip->options & NAND_BUSWIDTH_16) ? 16 : 8, |
3085 | busw ? 16 : 8); | 3084 | busw ? 16 : 8); |
3086 | return ERR_PTR(-EINVAL); | 3085 | return ERR_PTR(-EINVAL); |
3087 | } | 3086 | } |
3088 | 3087 | ||
@@ -3175,7 +3174,7 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips, | |||
3175 | 3174 | ||
3176 | if (IS_ERR(type)) { | 3175 | if (IS_ERR(type)) { |
3177 | if (!(chip->options & NAND_SCAN_SILENT_NODEV)) | 3176 | if (!(chip->options & NAND_SCAN_SILENT_NODEV)) |
3178 | pr_warn("No NAND device found.\n"); | 3177 | pr_warn("No NAND device found\n"); |
3179 | chip->select_chip(mtd, -1); | 3178 | chip->select_chip(mtd, -1); |
3180 | return PTR_ERR(type); | 3179 | return PTR_ERR(type); |
3181 | } | 3180 | } |
@@ -3243,8 +3242,8 @@ int nand_scan_tail(struct mtd_info *mtd) | |||
3243 | chip->ecc.layout = &nand_oob_128; | 3242 | chip->ecc.layout = &nand_oob_128; |
3244 | break; | 3243 | break; |
3245 | default: | 3244 | default: |
3246 | pr_warn("No oob scheme defined for " | 3245 | pr_warn("No oob scheme defined for oobsize %d\n", |
3247 | "oobsize %d\n", mtd->oobsize); | 3246 | mtd->oobsize); |
3248 | BUG(); | 3247 | BUG(); |
3249 | } | 3248 | } |
3250 | } | 3249 | } |
@@ -3263,7 +3262,7 @@ int nand_scan_tail(struct mtd_info *mtd) | |||
3263 | if (!chip->ecc.calculate || !chip->ecc.correct || | 3262 | if (!chip->ecc.calculate || !chip->ecc.correct || |
3264 | !chip->ecc.hwctl) { | 3263 | !chip->ecc.hwctl) { |
3265 | pr_warn("No ECC functions supplied; " | 3264 | pr_warn("No ECC functions supplied; " |
3266 | "Hardware ECC not possible\n"); | 3265 | "hardware ECC not possible\n"); |
3267 | BUG(); | 3266 | BUG(); |
3268 | } | 3267 | } |
3269 | if (!chip->ecc.read_page) | 3268 | if (!chip->ecc.read_page) |
@@ -3292,7 +3291,7 @@ int nand_scan_tail(struct mtd_info *mtd) | |||
3292 | !chip->ecc.write_page || | 3291 | !chip->ecc.write_page || |
3293 | chip->ecc.write_page == nand_write_page_hwecc)) { | 3292 | chip->ecc.write_page == nand_write_page_hwecc)) { |
3294 | pr_warn("No ECC functions supplied; " | 3293 | pr_warn("No ECC functions supplied; " |
3295 | "Hardware ECC not possible\n"); | 3294 | "hardware ECC not possible\n"); |
3296 | BUG(); | 3295 | BUG(); |
3297 | } | 3296 | } |
3298 | /* Use standard syndrome read/write page function? */ | 3297 | /* Use standard syndrome read/write page function? */ |
@@ -3312,8 +3311,8 @@ int nand_scan_tail(struct mtd_info *mtd) | |||
3312 | if (mtd->writesize >= chip->ecc.size) | 3311 | if (mtd->writesize >= chip->ecc.size) |
3313 | break; | 3312 | break; |
3314 | pr_warn("%d byte HW ECC not possible on " | 3313 | pr_warn("%d byte HW ECC not possible on " |
3315 | "%d byte page size, fallback to SW ECC\n", | 3314 | "%d byte page size, fallback to SW ECC\n", |
3316 | chip->ecc.size, mtd->writesize); | 3315 | chip->ecc.size, mtd->writesize); |
3317 | chip->ecc.mode = NAND_ECC_SOFT; | 3316 | chip->ecc.mode = NAND_ECC_SOFT; |
3318 | 3317 | ||
3319 | case NAND_ECC_SOFT: | 3318 | case NAND_ECC_SOFT: |
@@ -3367,7 +3366,7 @@ int nand_scan_tail(struct mtd_info *mtd) | |||
3367 | 3366 | ||
3368 | case NAND_ECC_NONE: | 3367 | case NAND_ECC_NONE: |
3369 | pr_warn("NAND_ECC_NONE selected by board driver. " | 3368 | pr_warn("NAND_ECC_NONE selected by board driver. " |
3370 | "This is not recommended !!\n"); | 3369 | "This is not recommended!\n"); |
3371 | chip->ecc.read_page = nand_read_page_raw; | 3370 | chip->ecc.read_page = nand_read_page_raw; |
3372 | chip->ecc.write_page = nand_write_page_raw; | 3371 | chip->ecc.write_page = nand_write_page_raw; |
3373 | chip->ecc.read_oob = nand_read_oob_std; | 3372 | chip->ecc.read_oob = nand_read_oob_std; |
@@ -3379,8 +3378,7 @@ int nand_scan_tail(struct mtd_info *mtd) | |||
3379 | break; | 3378 | break; |
3380 | 3379 | ||
3381 | default: | 3380 | default: |
3382 | pr_warn("Invalid NAND_ECC_MODE %d\n", | 3381 | pr_warn("Invalid NAND_ECC_MODE %d\n", chip->ecc.mode); |
3383 | chip->ecc.mode); | ||
3384 | BUG(); | 3382 | BUG(); |
3385 | } | 3383 | } |
3386 | 3384 | ||
@@ -3492,8 +3490,7 @@ int nand_scan(struct mtd_info *mtd, int maxchips) | |||
3492 | 3490 | ||
3493 | /* Many callers got this wrong, so check for it for a while... */ | 3491 | /* Many callers got this wrong, so check for it for a while... */ |
3494 | if (!mtd->owner && caller_is_module()) { | 3492 | if (!mtd->owner && caller_is_module()) { |
3495 | pr_crit("%s called with NULL mtd->owner!\n", | 3493 | pr_crit("%s called with NULL mtd->owner!\n", __func__); |
3496 | __func__); | ||
3497 | BUG(); | 3494 | BUG(); |
3498 | } | 3495 | } |
3499 | 3496 | ||
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 76f496d2bfed..dba332327d4f 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c | |||
@@ -205,7 +205,7 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, | |||
205 | res = mtd->read(mtd, from, len, &retlen, buf); | 205 | res = mtd->read(mtd, from, len, &retlen, buf); |
206 | if (res < 0) { | 206 | if (res < 0) { |
207 | if (retlen != len) { | 207 | if (retlen != len) { |
208 | pr_info("nand_bbt: Error reading bad block table\n"); | 208 | pr_info("nand_bbt: error reading bad block table\n"); |
209 | return res; | 209 | return res; |
210 | } | 210 | } |
211 | pr_warn("nand_bbt: ECC error while reading bad block table\n"); | 211 | pr_warn("nand_bbt: ECC error while reading bad block table\n"); |
@@ -219,8 +219,8 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, | |||
219 | if (tmp == msk) | 219 | if (tmp == msk) |
220 | continue; | 220 | continue; |
221 | if (reserved_block_code && (tmp == reserved_block_code)) { | 221 | if (reserved_block_code && (tmp == reserved_block_code)) { |
222 | pr_info("nand_read_bbt: Reserved block at 0x%012llx\n", | 222 | pr_info("nand_read_bbt: reserved block at 0x%012llx\n", |
223 | (loff_t)((offs << 2) + (act >> 1)) << this->bbt_erase_shift); | 223 | (loff_t)((offs << 2) + (act >> 1)) << this->bbt_erase_shift); |
224 | this->bbt[offs + (act >> 3)] |= 0x2 << (act & 0x06); | 224 | this->bbt[offs + (act >> 3)] |= 0x2 << (act & 0x06); |
225 | mtd->ecc_stats.bbtblocks++; | 225 | mtd->ecc_stats.bbtblocks++; |
226 | continue; | 226 | continue; |
@@ -229,8 +229,8 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, | |||
229 | * Leave it for now, if it's matured we can | 229 | * Leave it for now, if it's matured we can |
230 | * move this message to pr_debug. | 230 | * move this message to pr_debug. |
231 | */ | 231 | */ |
232 | pr_info("nand_read_bbt: Bad block at 0x%012llx\n", | 232 | pr_info("nand_read_bbt: bad block at 0x%012llx\n", |
233 | (loff_t)((offs << 2) + (act >> 1)) << this->bbt_erase_shift); | 233 | (loff_t)((offs << 2) + (act >> 1)) << this->bbt_erase_shift); |
234 | /* Factory marked bad or worn out? */ | 234 | /* Factory marked bad or worn out? */ |
235 | if (tmp == 0) | 235 | if (tmp == 0) |
236 | this->bbt[offs + (act >> 3)] |= 0x3 << (act & 0x06); | 236 | this->bbt[offs + (act >> 3)] |= 0x3 << (act & 0x06); |
@@ -390,7 +390,7 @@ static int read_abs_bbts(struct mtd_info *mtd, uint8_t *buf, | |||
390 | mtd->writesize, td); | 390 | mtd->writesize, td); |
391 | td->version[0] = buf[bbt_get_ver_offs(mtd, td)]; | 391 | td->version[0] = buf[bbt_get_ver_offs(mtd, td)]; |
392 | pr_info("Bad block table at page %d, version 0x%02X\n", | 392 | pr_info("Bad block table at page %d, version 0x%02X\n", |
393 | td->pages[0], td->version[0]); | 393 | td->pages[0], td->version[0]); |
394 | } | 394 | } |
395 | 395 | ||
396 | /* Read the mirror version, if available */ | 396 | /* Read the mirror version, if available */ |
@@ -399,7 +399,7 @@ static int read_abs_bbts(struct mtd_info *mtd, uint8_t *buf, | |||
399 | mtd->writesize, td); | 399 | mtd->writesize, td); |
400 | md->version[0] = buf[bbt_get_ver_offs(mtd, md)]; | 400 | md->version[0] = buf[bbt_get_ver_offs(mtd, md)]; |
401 | pr_info("Bad block table at page %d, version 0x%02X\n", | 401 | pr_info("Bad block table at page %d, version 0x%02X\n", |
402 | md->pages[0], md->version[0]); | 402 | md->pages[0], md->version[0]); |
403 | } | 403 | } |
404 | return 1; | 404 | return 1; |
405 | } | 405 | } |
@@ -532,7 +532,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, | |||
532 | if (ret) { | 532 | if (ret) { |
533 | this->bbt[i >> 3] |= 0x03 << (i & 0x6); | 533 | this->bbt[i >> 3] |= 0x03 << (i & 0x6); |
534 | pr_warn("Bad eraseblock %d at 0x%012llx\n", | 534 | pr_warn("Bad eraseblock %d at 0x%012llx\n", |
535 | i >> 1, (unsigned long long)from); | 535 | i >> 1, (unsigned long long)from); |
536 | mtd->ecc_stats.badblocks++; | 536 | mtd->ecc_stats.badblocks++; |
537 | } | 537 | } |
538 | 538 | ||
@@ -616,8 +616,8 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr | |||
616 | if (td->pages[i] == -1) | 616 | if (td->pages[i] == -1) |
617 | pr_warn("Bad block table not found for chip %d\n", i); | 617 | pr_warn("Bad block table not found for chip %d\n", i); |
618 | else | 618 | else |
619 | pr_info("Bad block table found at page %d, version 0x%02X\n", td->pages[i], | 619 | pr_info("Bad block table found at page %d, version " |
620 | td->version[i]); | 620 | "0x%02X\n", td->pages[i], td->version[i]); |
621 | } | 621 | } |
622 | return 0; | 622 | return 0; |
623 | } | 623 | } |
@@ -765,14 +765,12 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, | |||
765 | res = mtd->read(mtd, to, len, &retlen, buf); | 765 | res = mtd->read(mtd, to, len, &retlen, buf); |
766 | if (res < 0) { | 766 | if (res < 0) { |
767 | if (retlen != len) { | 767 | if (retlen != len) { |
768 | pr_info("nand_bbt: Error " | 768 | pr_info("nand_bbt: error reading block " |
769 | "reading block for writing " | 769 | "for writing the bad block table\n"); |
770 | "the bad block table\n"); | ||
771 | return res; | 770 | return res; |
772 | } | 771 | } |
773 | pr_warn("nand_bbt: ECC error " | 772 | pr_warn("nand_bbt: ECC error while reading " |
774 | "while reading block for writing " | 773 | "block for writing bad block table\n"); |
775 | "bad block table\n"); | ||
776 | } | 774 | } |
777 | /* Read oob data */ | 775 | /* Read oob data */ |
778 | ops.ooblen = (len >> this->page_shift) * mtd->oobsize; | 776 | ops.ooblen = (len >> this->page_shift) * mtd->oobsize; |
@@ -847,8 +845,8 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, | |||
847 | if (res < 0) | 845 | if (res < 0) |
848 | goto outerr; | 846 | goto outerr; |
849 | 847 | ||
850 | pr_info("Bad block table written to 0x%012llx, version " | 848 | pr_info("Bad block table written to 0x%012llx, version 0x%02X\n", |
851 | "0x%02X\n", (unsigned long long)to, td->version[chip]); | 849 | (unsigned long long)to, td->version[chip]); |
852 | 850 | ||
853 | /* Mark it as used */ | 851 | /* Mark it as used */ |
854 | td->pages[chip] = page; | 852 | td->pages[chip] = page; |
@@ -856,8 +854,7 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, | |||
856 | return 0; | 854 | return 0; |
857 | 855 | ||
858 | outerr: | 856 | outerr: |
859 | printk(KERN_WARNING | 857 | pr_warn("nand_bbt: error while writing bad block table %d\n", res); |
860 | "nand_bbt: Error while writing bad block table %d\n", res); | ||
861 | return res; | 858 | return res; |
862 | } | 859 | } |
863 | 860 | ||
@@ -1137,7 +1134,7 @@ int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd) | |||
1137 | */ | 1134 | */ |
1138 | if (!td) { | 1135 | if (!td) { |
1139 | if ((res = nand_memory_bbt(mtd, bd))) { | 1136 | if ((res = nand_memory_bbt(mtd, bd))) { |
1140 | pr_err("nand_bbt: Can't scan flash and build the RAM-based BBT\n"); | 1137 | pr_err("nand_bbt: can't scan flash and build the RAM-based BBT\n"); |
1141 | kfree(this->bbt); | 1138 | kfree(this->bbt); |
1142 | this->bbt = NULL; | 1139 | this->bbt = NULL; |
1143 | } | 1140 | } |
@@ -1305,7 +1302,7 @@ static int nand_create_default_bbt_descr(struct nand_chip *this) | |||
1305 | { | 1302 | { |
1306 | struct nand_bbt_descr *bd; | 1303 | struct nand_bbt_descr *bd; |
1307 | if (this->badblock_pattern) { | 1304 | if (this->badblock_pattern) { |
1308 | pr_warn("BBT descr already allocated; not replacing.\n"); | 1305 | pr_warn("BBT descr already allocated; not replacing\n"); |
1309 | return -EINVAL; | 1306 | return -EINVAL; |
1310 | } | 1307 | } |
1311 | bd = kzalloc(sizeof(*bd), GFP_KERNEL); | 1308 | bd = kzalloc(sizeof(*bd), GFP_KERNEL); |