On Mon, Aug 31, 2020 at 02:27:37PM +0200, Michal Simek wrote: > From: T Karthik Reddy <t.karthik.re...@xilinx.com> > > 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.re...@xilinx.com> > Signed-off-by: Michal Simek <michal.si...@xilinx.com>
Applied to u-boot/master, thanks! -- Tom
signature.asc
Description: PGP signature