Lines Matching refs:res
177 int res, ret = 0, i, j, act = 0; in read_bbt() local
201 res = mtd_read(mtd, from, len, &retlen, buf); in read_bbt()
202 if (res < 0) { in read_bbt()
203 if (mtd_is_eccerr(res)) { in read_bbt()
206 return res; in read_bbt()
207 } else if (mtd_is_bitflip(res)) { in read_bbt()
210 ret = res; in read_bbt()
213 return res; in read_bbt()
270 int res = 0, i; in read_abs_bbt() local
276 res = read_bbt(mtd, buf, td->pages[i], in read_abs_bbt()
279 if (res) in read_abs_bbt()
280 return res; in read_abs_bbt()
284 res = read_bbt(mtd, buf, td->pages[0], in read_abs_bbt()
286 if (res) in read_abs_bbt()
287 return res; in read_abs_bbt()
321 int res, ret = 0; in scan_read_oob() local
332 res = mtd_read_oob(mtd, offs, &ops); in scan_read_oob()
333 if (res) { in scan_read_oob()
334 if (!mtd_is_bitflip_or_eccerr(res)) in scan_read_oob()
335 return res; in scan_read_oob()
336 else if (mtd_is_eccerr(res) || !ret) in scan_read_oob()
337 ret = res; in scan_read_oob()
626 int i, res, chip = 0; in write_bbt() local
725 res = mtd_read(mtd, to, len, &retlen, buf); in write_bbt()
726 if (res < 0) { in write_bbt()
729 return res; in write_bbt()
736 res = mtd_read_oob(mtd, to + mtd->writesize, &ops); in write_bbt()
737 if (res < 0 || ops.oobretlen != ops.ooblen) in write_bbt()
792 res = nand_erase_nand(mtd, &einfo, 1); in write_bbt()
793 if (res < 0) in write_bbt()
796 res = scan_write_bbt(mtd, to, len, buf, in write_bbt()
799 if (res < 0) in write_bbt()
811 pr_warn("nand_bbt: error while writing bad block table %d\n", res); in write_bbt()
812 return res; in write_bbt()
843 int i, chips, writeops, create, chipsel, res, res2; in check_create() local
860 res = res2 = 0; in check_create()
910 res = read_abs_bbt(mtd, buf, rd, chipsel); in check_create()
911 if (mtd_is_eccerr(res)) { in check_create()
932 if (mtd_is_bitflip(res) || mtd_is_bitflip(res2)) in check_create()
943 res = write_bbt(mtd, buf, td, md, chipsel); in check_create()
944 if (res < 0) in check_create()
945 return res; in check_create()
950 res = write_bbt(mtd, buf, md, td, chipsel); in check_create()
951 if (res < 0) in check_create()
952 return res; in check_create()
1081 int len, res = 0; in nand_scan_bbt() local
1100 if ((res = nand_memory_bbt(mtd, bd))) { in nand_scan_bbt()
1105 return res; in nand_scan_bbt()
1128 res = check_create(mtd, buf, bd); in nand_scan_bbt()
1136 return res; in nand_scan_bbt()
1149 int len, res = 0; in nand_update_bbt() local
1180 res = write_bbt(mtd, buf, td, md, chipsel); in nand_update_bbt()
1181 if (res < 0) in nand_update_bbt()
1186 res = write_bbt(mtd, buf, md, td, chipsel); in nand_update_bbt()
1191 return res; in nand_update_bbt()
1334 int block, res; in nand_isbad_bbt() local
1337 res = bbt_get_entry(this, block); in nand_isbad_bbt()
1340 (unsigned int)offs, block, res); in nand_isbad_bbt()
1342 switch (res) { in nand_isbad_bbt()