linux/drivers/mtd
Brian Norris df698621a5 mtd: nand: move SCANLASTPAGE handling to the correct code block
As nand_default_block_markbad() is becoming more complex, it helps to
have code appear only in its relevant codepath(s). Here, the calculation
of `ofs' based on NAND_BBT_SCANLASTPAGE is only useful on paths where we
write bad block markers to OOB. We move the condition/calculation closer
to the `write' operation and update the comment to more correctly
describe the operation.

The variable `wr_ofs' is also used to help isolate our calculation of
the "write" offset from the usage of `ofs' to represent the eraseblock
offset. This will become useful when we reorder operations in the next
patch.

This patch should make no functional change.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:16:04 +01:00
..
chips mtd: cfi: AMD/Fujitsu compatibles: add panic write support 2012-03-27 00:11:03 +01:00
devices mtd: spear_smi: release memory region during remove 2012-03-27 00:14:36 +01:00
lpddr mtd: lpddr: drop unnecessary zeroing 2012-01-09 18:24:48 +00:00
maps mtd: sa11x0: remove definitions and code left for documentation purposes 2012-03-27 00:15:20 +01:00
nand mtd: nand: move SCANLASTPAGE handling to the correct code block 2012-03-27 00:16:04 +01:00
onenand mtd: onenand: samsung: add missing iounmap 2012-03-27 00:11:20 +01:00
tests mtd: introduce mtd_can_have_bb helper 2012-01-09 18:26:24 +00:00
ubi UBI: use own macros for the layout volume 2012-01-15 15:08:55 +02:00
afs.c mtd: introduce mtd_read interface 2012-01-09 18:25:19 +00:00
ar7part.c mtd: introduce mtd_read interface 2012-01-09 18:25:19 +00:00
bcm63xxpart.c mtd: introduce mtd_read interface 2012-01-09 18:25:19 +00:00
cmdlinepart.c Merge git://git.infradead.org/mtd-2.6 2011-11-07 09:11:16 -08:00
ftl.c mtd: do not use mtd->sync directly 2012-01-09 18:26:21 +00:00
inftlcore.c mtd: introduce mtd_write_oob interface 2012-01-09 18:25:24 +00:00
inftlmount.c mtd: introduce mtd_block_markbad interface 2012-01-09 18:25:48 +00:00
Kconfig mtd: mtdoops: kill Kconfig usage instructions 2012-03-27 00:15:37 +01:00
Makefile mtd: maps: bcm963xx-flash: make CFE partition parsing an mtd parser 2012-01-09 18:15:31 +00:00
mtd_blkdevs.c mtd: mtdblock: call mtd_sync() only if opened for write 2012-03-27 00:11:11 +01:00
mtdblock_ro.c mtd: introduce mtd_write interface 2012-01-09 18:25:20 +00:00
mtdblock.c mtd: mtdblock: call mtd_sync() only if opened for write 2012-03-27 00:11:11 +01:00
mtdchar.c mtd: do not use mtd->block_markbad directly 2012-01-09 18:26:26 +00:00
mtdconcat.c mtd: do not use mtd->block_markbad directly 2012-01-09 18:26:26 +00:00
mtdcore.c mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined 2012-03-27 00:11:16 +01:00
mtdcore.h mtd: hide parse_mtd_partitions 2011-09-11 15:02:13 +03:00
mtdoops.c kexec: remove KMSG_DUMP_KEXEC 2012-01-12 20:13:11 -08:00
mtdpart.c mtd: introduce mtd_block_markbad interface 2012-01-09 18:25:48 +00:00
mtdsuper.c Merge git://git.infradead.org/mtd-2.6 2011-11-07 09:11:16 -08:00
mtdswap.c mtd: do not use mtd->block_markbad directly 2012-01-09 18:26:26 +00:00
nftlcore.c mtd: introduce mtd_can_have_bb helper 2012-01-09 18:26:24 +00:00
nftlmount.c mtd: introduce mtd_block_markbad interface 2012-01-09 18:25:48 +00:00
ofpart.c mtd: ofpart: add ofoldpart alias 2011-09-11 15:02:14 +03:00
redboot.c mtd: introduce mtd_can_have_bb helper 2012-01-09 18:26:24 +00:00
rfd_ftl.c mtd: do not use mtd->sync directly 2012-01-09 18:26:21 +00:00
sm_ftl.c mtd: introduce mtd_has_oob helper 2012-01-09 18:26:08 +00:00
sm_ftl.h mtd: sm_ftl: cosmetic, use bool when possible 2010-10-25 01:33:08 +01:00
ssfdc.c mtd: introduce mtd_block_isbad interface 2012-01-09 18:25:47 +00:00