diff options
Diffstat (limited to 'drivers/mtd/ubi/io.c')
-rw-r--r-- | drivers/mtd/ubi/io.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 8c1b1c7bc4a7..6ba55c235873 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c | |||
@@ -212,7 +212,7 @@ retry: | |||
212 | } else { | 212 | } else { |
213 | ubi_assert(len == read); | 213 | ubi_assert(len == read); |
214 | 214 | ||
215 | if (ubi_dbg_is_bitflip()) { | 215 | if (ubi_dbg_is_bitflip(ubi)) { |
216 | dbg_gen("bit-flip (emulated)"); | 216 | dbg_gen("bit-flip (emulated)"); |
217 | err = UBI_IO_BITFLIPS; | 217 | err = UBI_IO_BITFLIPS; |
218 | } | 218 | } |
@@ -281,7 +281,7 @@ int ubi_io_write(struct ubi_device *ubi, const void *buf, int pnum, int offset, | |||
281 | return err; | 281 | return err; |
282 | } | 282 | } |
283 | 283 | ||
284 | if (ubi_dbg_is_write_failure()) { | 284 | if (ubi_dbg_is_write_failure(ubi)) { |
285 | dbg_err("cannot write %d bytes to PEB %d:%d " | 285 | dbg_err("cannot write %d bytes to PEB %d:%d " |
286 | "(emulated)", len, pnum, offset); | 286 | "(emulated)", len, pnum, offset); |
287 | ubi_dbg_dump_stack(); | 287 | ubi_dbg_dump_stack(); |
@@ -396,7 +396,7 @@ retry: | |||
396 | if (err) | 396 | if (err) |
397 | return err; | 397 | return err; |
398 | 398 | ||
399 | if (ubi_dbg_is_erase_failure()) { | 399 | if (ubi_dbg_is_erase_failure(ubi)) { |
400 | dbg_err("cannot erase PEB %d (emulated)", pnum); | 400 | dbg_err("cannot erase PEB %d (emulated)", pnum); |
401 | return -EIO; | 401 | return -EIO; |
402 | } | 402 | } |
@@ -1146,7 +1146,7 @@ static int paranoid_check_not_bad(const struct ubi_device *ubi, int pnum) | |||
1146 | { | 1146 | { |
1147 | int err; | 1147 | int err; |
1148 | 1148 | ||
1149 | if (!(ubi_chk_flags & UBI_CHK_IO)) | 1149 | if (!ubi->dbg->chk_io) |
1150 | return 0; | 1150 | return 0; |
1151 | 1151 | ||
1152 | err = ubi_io_is_bad(ubi, pnum); | 1152 | err = ubi_io_is_bad(ubi, pnum); |
@@ -1173,7 +1173,7 @@ static int paranoid_check_ec_hdr(const struct ubi_device *ubi, int pnum, | |||
1173 | int err; | 1173 | int err; |
1174 | uint32_t magic; | 1174 | uint32_t magic; |
1175 | 1175 | ||
1176 | if (!(ubi_chk_flags & UBI_CHK_IO)) | 1176 | if (!ubi->dbg->chk_io) |
1177 | return 0; | 1177 | return 0; |
1178 | 1178 | ||
1179 | magic = be32_to_cpu(ec_hdr->magic); | 1179 | magic = be32_to_cpu(ec_hdr->magic); |
@@ -1211,7 +1211,7 @@ static int paranoid_check_peb_ec_hdr(const struct ubi_device *ubi, int pnum) | |||
1211 | uint32_t crc, hdr_crc; | 1211 | uint32_t crc, hdr_crc; |
1212 | struct ubi_ec_hdr *ec_hdr; | 1212 | struct ubi_ec_hdr *ec_hdr; |
1213 | 1213 | ||
1214 | if (!(ubi_chk_flags & UBI_CHK_IO)) | 1214 | if (!ubi->dbg->chk_io) |
1215 | return 0; | 1215 | return 0; |
1216 | 1216 | ||
1217 | ec_hdr = kzalloc(ubi->ec_hdr_alsize, GFP_NOFS); | 1217 | ec_hdr = kzalloc(ubi->ec_hdr_alsize, GFP_NOFS); |
@@ -1255,7 +1255,7 @@ static int paranoid_check_vid_hdr(const struct ubi_device *ubi, int pnum, | |||
1255 | int err; | 1255 | int err; |
1256 | uint32_t magic; | 1256 | uint32_t magic; |
1257 | 1257 | ||
1258 | if (!(ubi_chk_flags & UBI_CHK_IO)) | 1258 | if (!ubi->dbg->chk_io) |
1259 | return 0; | 1259 | return 0; |
1260 | 1260 | ||
1261 | magic = be32_to_cpu(vid_hdr->magic); | 1261 | magic = be32_to_cpu(vid_hdr->magic); |
@@ -1296,7 +1296,7 @@ static int paranoid_check_peb_vid_hdr(const struct ubi_device *ubi, int pnum) | |||
1296 | struct ubi_vid_hdr *vid_hdr; | 1296 | struct ubi_vid_hdr *vid_hdr; |
1297 | void *p; | 1297 | void *p; |
1298 | 1298 | ||
1299 | if (!(ubi_chk_flags & UBI_CHK_IO)) | 1299 | if (!ubi->dbg->chk_io) |
1300 | return 0; | 1300 | return 0; |
1301 | 1301 | ||
1302 | vid_hdr = ubi_zalloc_vid_hdr(ubi, GFP_NOFS); | 1302 | vid_hdr = ubi_zalloc_vid_hdr(ubi, GFP_NOFS); |
@@ -1348,7 +1348,7 @@ int ubi_dbg_check_write(struct ubi_device *ubi, const void *buf, int pnum, | |||
1348 | void *buf1; | 1348 | void *buf1; |
1349 | loff_t addr = (loff_t)pnum * ubi->peb_size + offset; | 1349 | loff_t addr = (loff_t)pnum * ubi->peb_size + offset; |
1350 | 1350 | ||
1351 | if (!(ubi_chk_flags & UBI_CHK_IO)) | 1351 | if (!ubi->dbg->chk_io) |
1352 | return 0; | 1352 | return 0; |
1353 | 1353 | ||
1354 | buf1 = __vmalloc(len, GFP_NOFS, PAGE_KERNEL); | 1354 | buf1 = __vmalloc(len, GFP_NOFS, PAGE_KERNEL); |
@@ -1412,7 +1412,7 @@ int ubi_dbg_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len) | |||
1412 | void *buf; | 1412 | void *buf; |
1413 | loff_t addr = (loff_t)pnum * ubi->peb_size + offset; | 1413 | loff_t addr = (loff_t)pnum * ubi->peb_size + offset; |
1414 | 1414 | ||
1415 | if (!(ubi_chk_flags & UBI_CHK_IO)) | 1415 | if (!ubi->dbg->chk_io) |
1416 | return 0; | 1416 | return 0; |
1417 | 1417 | ||
1418 | buf = __vmalloc(len, GFP_NOFS, PAGE_KERNEL); | 1418 | buf = __vmalloc(len, GFP_NOFS, PAGE_KERNEL); |