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>
--- /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.
+
+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;
--- 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)),