[OPW,kernel] Staging: mt29f_spinand: Fix mt29f_spinand.c compilation when CONFIG_MTD_SPINAND_ONDIEECC=n
diff mbox

Message ID 20131015062359.GA27931@Ashvini
State Superseded
Headers show

Commit Message

Ashvini Varatharaj Oct. 15, 2013, 6:23 a.m. UTC
drivers/staging/mt29f_spinand/mt29f_spinand.c:665:9: error: implicit
declaration of function ‘mtd_to_state’[-Werror=implicit-function-declaration]

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
---
 drivers/staging/mt29f_spinand/mt29f_spinand.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Greg KH Oct. 15, 2013, 4:02 p.m. UTC | #1
On Tue, Oct 15, 2013 at 11:53:59AM +0530, Ashvini Varatharaj wrote:
> drivers/staging/mt29f_spinand/mt29f_spinand.c:665:9: error: implicit
> declaration of function ‘mtd_to_state’[-Werror=implicit-function-declaration]
> 
> Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
> ---
>  drivers/staging/mt29f_spinand/mt29f_spinand.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Why did you send two copies of this patch to the mailing list?  Which
one should I apply/review?

Given that I don't know, I've deleted both of them, sorry.

Please resend the one that you wish to have reviewed.

thanks,

greg k-h

Patch
diff mbox

diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c b/drivers/staging/mt29f_spinand/mt29f_spinand.c
index 5647079..36fefb6 100644
--- a/drivers/staging/mt29f_spinand/mt29f_spinand.c
+++ b/drivers/staging/mt29f_spinand/mt29f_spinand.c
@@ -28,10 +28,6 @@ 
 /*
  * OOB area specification layout:  Total 32 available free bytes.
  */
-#ifdef CONFIG_MTD_SPINAND_ONDIEECC
-static int enable_hw_ecc;
-static int enable_read_hw_ecc;
-
 static inline struct spinand_state *mtd_to_state(struct mtd_info *mtd)
 {
 	struct nand_chip *chip = (struct nand_chip *)mtd->priv;
@@ -41,6 +37,10 @@  static inline struct spinand_state *mtd_to_state(struct mtd_info *mtd)
 	return state;
 }
 
+#ifdef CONFIG_MTD_SPINAND_ONDIEECC
+static int enable_hw_ecc;
+static int enable_read_hw_ecc;
+
 static struct nand_ecclayout spinand_oob_64 = {
 	.eccbytes = 24,
 	.eccpos = {