Skip to content

Commit 73600b6

Browse files
montjoieBoris Brezillon
authored andcommitted
mtd: nand: remove unused blockmask variable
This patch fix the following build warning: drivers/mtd/nand/nand_base.c:2671:30: attention : variable ‘blockmask’ set but not used [-Wunused-but-set-variable] Fixes: 0b4773f ("mtd: nand: Drop unused cached programming support") Signed-off-by: Corentin Labbe <[email protected]> Signed-off-by: Boris Brezillon <[email protected]>
1 parent 17b694a commit 73600b6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/mtd/nand/nand_base.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,7 +2668,7 @@ static uint8_t *nand_fill_oob(struct mtd_info *mtd, uint8_t *oob, size_t len,
26682668
static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
26692669
struct mtd_oob_ops *ops)
26702670
{
2671-
int chipnr, realpage, page, blockmask, column;
2671+
int chipnr, realpage, page, column;
26722672
struct nand_chip *chip = mtd_to_nand(mtd);
26732673
uint32_t writelen = ops->len;
26742674

@@ -2704,7 +2704,6 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
27042704

27052705
realpage = (int)(to >> chip->page_shift);
27062706
page = realpage & chip->pagemask;
2707-
blockmask = (1 << (chip->phys_erase_shift - chip->page_shift)) - 1;
27082707

27092708
/* Invalidate the page cache, when we write to the cached page */
27102709
if (to <= ((loff_t)chip->pagebuf << chip->page_shift) &&

0 commit comments

Comments
 (0)