uboot-mediatek: fix FORESEE Flash build warning
Some checks failed
Build all core packages / Build all core packages for selected target (push) Has been cancelled

Remove unused variable to fix the warning:

drivers/mtd/nand/spi/foresee.c: In function 'f35sqa002g_ecc_get_status':
drivers/mtd/nand/spi/foresee.c:56:29: warning: unused variable 'nand' [-Wunused-variable]
   56 |         struct nand_device *nand = spinand_to_nand(spinand);
      |                             ^~~~

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
This commit is contained in:
Shiji Yang 2025-07-22 07:52:21 +08:00 committed by Daniel Golle
parent 8a63382018
commit 6b981c5464
2 changed files with 2 additions and 4 deletions

View file

@ -40,7 +40,7 @@ Link: https://lore.kernel.org/linux-mtd/20231002140458.147605-1-mmkurbanov@salut
--- /dev/null
+++ b/drivers/mtd/nand/spi/foresee.c
@@ -0,0 +1,97 @@
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023, SberDevices. All Rights Reserved.
@ -96,8 +96,6 @@ Link: https://lore.kernel.org/linux-mtd/20231002140458.147605-1-mmkurbanov@salut
+
+static int f35sqa002g_ecc_get_status(struct spinand_device *spinand, u8 status)
+{
+ struct nand_device *nand = spinand_to_nand(spinand);
+
+ switch (status & STATUS_ECC_MASK) {
+ case STATUS_ECC_NO_BITFLIPS:
+ return 0;

View file

@ -19,7 +19,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
--- a/drivers/mtd/nand/spi/foresee.c
+++ b/drivers/mtd/nand/spi/foresee.c
@@ -83,6 +83,16 @@ static const struct spinand_info foresee
@@ -81,6 +81,16 @@ static const struct spinand_info foresee
SPINAND_HAS_QE_BIT,
SPINAND_ECCINFO(&f35sqa002g_ooblayout,
f35sqa002g_ecc_get_status)),