aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/wbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/wbuf.c')
-rw-r--r--fs/jffs2/wbuf.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index 89a6ec0fa766..74d9be19df3f 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -11,6 +11,8 @@
11 * 11 *
12 */ 12 */
13 13
14#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
15
14#include <linux/kernel.h> 16#include <linux/kernel.h>
15#include <linux/slab.h> 17#include <linux/slab.h>
16#include <linux/mtd/mtd.h> 18#include <linux/mtd/mtd.h>
@@ -1135,7 +1137,7 @@ int jffs2_write_nand_badblock(struct jffs2_sb_info *c, struct jffs2_eraseblock *
1135 if( ++jeb->bad_count < MAX_ERASE_FAILURES) 1137 if( ++jeb->bad_count < MAX_ERASE_FAILURES)
1136 return 0; 1138 return 0;
1137 1139
1138 pr_warn("JFFS2: marking eraseblock at %08x as bad\n", bad_offset); 1140 pr_warn("marking eraseblock at %08x as bad\n", bad_offset);
1139 ret = mtd_block_markbad(c->mtd, bad_offset); 1141 ret = mtd_block_markbad(c->mtd, bad_offset);
1140 1142
1141 if (ret) { 1143 if (ret) {
@@ -1161,7 +1163,7 @@ int jffs2_nand_flash_setup(struct jffs2_sb_info *c)
1161 return -EINVAL; 1163 return -EINVAL;
1162 } 1164 }
1163 1165
1164 jffs2_dbg(1, "JFFS2 using OOB on NAND\n"); 1166 jffs2_dbg(1, "using OOB on NAND\n");
1165 1167
1166 c->oobavail = oinfo->oobavail; 1168 c->oobavail = oinfo->oobavail;
1167 1169
@@ -1228,7 +1230,7 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) {
1228 1230
1229 if ((c->flash_size % c->sector_size) != 0) { 1231 if ((c->flash_size % c->sector_size) != 0) {
1230 c->flash_size = (c->flash_size / c->sector_size) * c->sector_size; 1232 c->flash_size = (c->flash_size / c->sector_size) * c->sector_size;
1231 pr_warn("JFFS2 flash size adjusted to %dKiB\n", c->flash_size); 1233 pr_warn("flash size adjusted to %dKiB\n", c->flash_size);
1232 }; 1234 };
1233 1235
1234 c->wbuf_ofs = 0xFFFFFFFF; 1236 c->wbuf_ofs = 0xFFFFFFFF;
@@ -1245,7 +1247,7 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) {
1245 } 1247 }
1246#endif 1248#endif
1247 1249
1248 pr_info("JFFS2 write-buffering enabled buffer (%d) erasesize (%d)\n", 1250 pr_info("write-buffering enabled buffer (%d) erasesize (%d)\n",
1249 c->wbuf_pagesize, c->sector_size); 1251 c->wbuf_pagesize, c->sector_size);
1250 1252
1251 return 0; 1253 return 0;
@@ -1304,7 +1306,7 @@ int jffs2_ubivol_setup(struct jffs2_sb_info *c) {
1304 if (!c->wbuf) 1306 if (!c->wbuf)
1305 return -ENOMEM; 1307 return -ENOMEM;
1306 1308
1307 pr_info("JFFS2 write-buffering enabled buffer (%d) erasesize (%d)\n", 1309 pr_info("write-buffering enabled buffer (%d) erasesize (%d)\n",
1308 c->wbuf_pagesize, c->sector_size); 1310 c->wbuf_pagesize, c->sector_size);
1309 1311
1310 return 0; 1312 return 0;