From: Brian Norris Date: Sat, 21 Jan 2012 04:38:03 +0000 (-0800) Subject: mtd: nand: move SCANLASTPAGE handling to the correct code block X-Git-Tag: v3.4-rc1~16^2~105 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df698621a5b39ced5ce527444cafd50c6fdc186d;p=pandora-kernel.git 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 Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- Reading git-diff-tree failed