Skip to contentSkip to conversation

mtd: nand: fsl_ifc: remove unused variable

PATCH In review Arnd Bergmann 3 participants 4 messages Jun 9, 2017

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

PATCH 1/1 mtd: nand: fsl_ifc: remove unused variable

This one was accidentally introduced without any references, and it causes a harmless warning:

drivers/mtd/nand/fsl_ifc_nand.c: In function 'fsl_ifc_read_page':
drivers/mtd/nand/fsl_ifc_nand.c:696:7: error: unused variable 'res' [-Werror=unused-variable]

Fixes 79f40cc12fd3 ("mtd: nand: fsl_ifc: fix handing of bit flips in erased pages")
---
 drivers/mtd/nand/fsl_ifc_nand.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mtd/nand/fsl_ifc_nand.c +0 -2
index 14ef2f4524ac..d1c4538f870f 100644
@@ -693,8 +693,6 @@ static int fsl_ifc_read_page(struct mtd_info *mtd, struct nand_chip *chip,
 		fsl_ifc_read_buf(mtd, chip->oob_poi, mtd->oobsize);
 
 	if (ctrl->nand_stat & IFC_NAND_EVTER_STAT_ECCER) {
-		int res;
-
 		if (!oob_required)
 			fsl_ifc_read_buf(mtd, chip->oob_poi, mtd->oobsize);
 
Signature · 1 line
2.9.0
#1 lore raw
Quoted 8 lines · On Fri, 9 Jun 2017 12:47:43 +0200 Arnd Bergmann <[email protected]> wrote:

This one was accidentally introduced without any references, and it causes a harmless warning:

drivers/mtd/nand/fsl_ifc_nand.c: In function 'fsl_ifc_read_page':
drivers/mtd/nand/fsl_ifc_nand.c:696:7: error: unused variable 'res' [-Werror=unused-variable]

Fixes 79f40cc12fd3 ("mtd: nand: fsl_ifc: fix handing of bit flips in erased pages")

If you don't mind, I'll squash the change in the initial commit.

Thanks,

Boris

Quoted 17 lines
---
 drivers/mtd/nand/fsl_ifc_nand.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mtd/nand/fsl_ifc_nand.c +0 -2
index 14ef2f4524ac..d1c4538f870f 100644
@@ -693,8 +693,6 @@ static int fsl_ifc_read_page(struct mtd_info *mtd, struct nand_chip *chip,
 		fsl_ifc_read_buf(mtd, chip->oob_poi, mtd->oobsize);
 
 	if (ctrl->nand_stat & IFC_NAND_EVTER_STAT_ECCER) {
-		int res;
-
 		if (!oob_required)
 			fsl_ifc_read_buf(mtd, chip->oob_poi, mtd->oobsize);
 
#2 lore raw
Quoted 6 lines · Boris Brezillon
Quoted 3 lines · On Fri, 9 Jun 2017 12:47:43 +0200 Arnd Bergmann <[email protected]> wrote:

This one was accidentally introduced without any references, and it causes a harmless warning:

Quoted 7 lines
Quoted 5 lines

drivers/mtd/nand/fsl_ifc_nand.c: In function 'fsl_ifc_read_page':
drivers/mtd/nand/fsl_ifc_nand.c:696:7: error: unused variable 'res' [-Werror=unused-variable]

Fixes 79f40cc12fd3 ("mtd: nand: fsl_ifc: fix handing of bit flips in erased pages")

If you don't mind, I'll squash the change in the initial commit.

Sure, that's always the best way to do it when the commits are not yet stable.

Arnd

Acked-by on v1 1/1
#3 lore raw
In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

This one was accidentally introduced without any references, and it causes a harmless warning:

drivers/mtd/nand/fsl_ifc_nand.c: In function 'fsl_ifc_read_page':
drivers/mtd/nand/fsl_ifc_nand.c:696:7: error: unused variable 'res' [-Werror=unused-variable]

Fixes 79f40cc12fd3 ("mtd: nand: fsl_ifc: fix handing of bit flips in erased pages")

Thanks!
Pavel

Quoted 17 lines
---
 drivers/mtd/nand/fsl_ifc_nand.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mtd/nand/fsl_ifc_nand.c +0 -2
index 14ef2f4524ac..d1c4538f870f 100644
@@ -693,8 +693,6 @@ static int fsl_ifc_read_page(struct mtd_info *mtd, struct nand_chip *chip,
 		fsl_ifc_read_buf(mtd, chip->oob_poi, mtd->oobsize);
 
 	if (ctrl->nand_stat & IFC_NAND_EVTER_STAT_ECCER) {
-		int res;
-
 		if (!oob_required)
 			fsl_ifc_read_buf(mtd, chip->oob_poi, mtd->oobsize);
 
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html