Skip to contentSkip to conversation

mtd: rawnand: mpc5121: Remove unused variable in ads5121_select_chip()

PATCH Applied Geert Uytterhoeven 2 participants 2 messages Nov 22, 2021 – Dec 3, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: rawnand: mpc5121: Remove unused variable in ads5121_select_chip()

drivers/mtd/nand/raw/mpc5121_nfc.c: In function ‘ads5121_select_chip’:
drivers/mtd/nand/raw/mpc5121_nfc.c:294:19: warning: unused variable ‘mtd’ [-Wunused-variable]
294 | struct mtd_info *mtd = nand_to_mtd(nand);
| ^~~

Fixes 758b56f58b66bebc ("mtd: rawnand: Pass a nand_chip object to chip->select_chip()")
---
 drivers/mtd/nand/raw/mpc5121_nfc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mtd/nand/raw/mpc5121_nfc.c +0 -1
index cb293c50acb876fe..5b9271b9c32655b4 100644
@@ -291,7 +291,6 @@ static int ads5121_chipselect_init(struct mtd_info *mtd)
 /* Control chips select signal on ADS5121 board */
 static void ads5121_select_chip(struct nand_chip *nand, int chip)
 {
-	struct mtd_info *mtd = nand_to_mtd(nand);
 	struct mpc5121_nfc_prv *prv = nand_get_controller_data(nand);
 	u8 v;
 
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Geert Uytterhoeven

drivers/mtd/nand/raw/mpc5121_nfc.c: In function ‘ads5121_select_chip’:
drivers/mtd/nand/raw/mpc5121_nfc.c:294:19: warning: unused variable ‘mtd’ [-Wunused-variable]
294 | struct mtd_info *mtd = nand_to_mtd(nand);
| ^~~

Fixes 758b56f58b66bebc ("mtd: rawnand: Pass a nand_chip object to chip->select_chip()")

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel