Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752699AbdIBIvs (ORCPT ); Sat, 2 Sep 2017 04:51:48 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36638 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751603AbdIBIvr (ORCPT ); Sat, 2 Sep 2017 04:51:47 -0400 X-Google-Smtp-Source: ADKCNb6OEe2fNrrhfQqJiFKrYbUDY1wa0CqaL7D6puDYSS4tNdtwdHwcqNjNrpwDyKwaGZFaPCoPgQ== From: Corentin Labbe To: boris.brezillon@free-electrons.com, richard@nod.at, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, cyrille.pitchen@wedev4u.fr Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Corentin Labbe Subject: [PATCH] mtd: nand: remove unused blockmask variable Date: Sat, 2 Sep 2017 10:49:38 +0200 Message-Id: <20170902084938.15942-1-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1239 Lines: 31 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] Signed-off-by: Corentin Labbe --- drivers/mtd/nand/nand_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 9900476a0afe..b875fd365084 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2668,7 +2668,7 @@ static uint8_t *nand_fill_oob(struct mtd_info *mtd, uint8_t *oob, size_t len, static int nand_do_write_ops(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops) { - int chipnr, realpage, page, blockmask, column; + int chipnr, realpage, page, column; struct nand_chip *chip = mtd_to_nand(mtd); uint32_t writelen = ops->len; @@ -2704,7 +2704,6 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to, realpage = (int)(to >> chip->page_shift); page = realpage & chip->pagemask; - blockmask = (1 << (chip->phys_erase_shift - chip->page_shift)) - 1; /* Invalidate the page cache, when we write to the cached page */ if (to <= ((loff_t)chip->pagebuf << chip->page_shift) && -- 2.13.5