summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>2020-08-31 14:27:37 +0200
committerTom Rini <trini@konsulko.com>2020-09-11 17:13:56 -0400
commit1e2c5bb9e7f9fdad05a5b1f36c44da5cc430b8a9 (patch)
tree35d09c59d365123c5e8072c33c0ee19e45dd2a28 /arch
parent142775a52bc97d5273922970b8a9cc9f95091359 (diff)
mtd: nand: Fix nand write error with bad block addresses above 32-bit
Nand writes should skip the bad blocks with "nand write" command. In case of bad blocks with above 32-bit address, nand_block_isbad() returns false due to truncated bad block address. In below code segment, if (nand_block_isbad(mtd, offset & ~(mtd->erasesize - 1))) offset is 64-bit and mtd->erasesize is 32-bit, hence the truncation is happening. Cast 'mtd->erasesize' with loff_t to fix this issue. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions