From: Randy Dunlap <rdunlap@infradead.org>
To: Thierry Reding <thierry.reding@gmail.com>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Mark Brown <broonie@kernel.org>,
Kamlakant Patel <kamlakant.patel@broadcom.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mona Anonuevo <manonuevo@micron.com>,
linux-mtd@lists.infradead.org
Subject: [PATCH -next] staging/mt29f_spinand: fix build error when ONDIEECC not enabled
Date: Mon, 14 Oct 2013 12:39:37 -0700 [thread overview]
Message-ID: <525C4879.4030705@infradead.org> (raw)
In-Reply-To: <1381762088-18880-1-git-send-email-treding@nvidia.com>
From: Randy Dunlap <rdunlap@infradead.org>
Fix build error when CONFIG_MTD_SPINAND_ONDIEECC is not enabled
by moving an inline function outside of that #ifdef block.
drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_read_byte':
drivers/staging/mt29f_spinand/mt29f_spinand.c:665:9: error: implicit declaration of function 'mtd_to_state' [-Werror=implicit-function-declaration]
drivers/staging/mt29f_spinand/mt29f_spinand.c:665:32: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_write_buf':
drivers/staging/mt29f_spinand/mt29f_spinand.c:700:32: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_read_buf':
drivers/staging/mt29f_spinand/mt29f_spinand.c:707:32: warning: initialization makes pointer from integer without a cast [enabled by default]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Kamlakant Patel <kamlakant.patel@broadcom.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mona Anonuevo <manonuevo@micron.com>
Cc: linux-mtd@lists.infradead.org
---
drivers/staging/mt29f_spinand/mt29f_spinand.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- next-2013-1014.orig/drivers/staging/mt29f_spinand/mt29f_spinand.c
+++ next-2013-1014/drivers/staging/mt29f_spinand/mt29f_spinand.c
@@ -28,9 +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)
{
@@ -41,6 +38,10 @@ static inline struct spinand_state *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 = {
WARNING: multiple messages have this Message-ID (diff)
From: Randy Dunlap <rdunlap@infradead.org>
To: Thierry Reding <thierry.reding@gmail.com>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Brown <broonie@kernel.org>,
linux-mtd@lists.infradead.org,
Kamlakant Patel <kamlakant.patel@broadcom.com>,
Mona Anonuevo <manonuevo@micron.com>
Subject: [PATCH -next] staging/mt29f_spinand: fix build error when ONDIEECC not enabled
Date: Mon, 14 Oct 2013 12:39:37 -0700 [thread overview]
Message-ID: <525C4879.4030705@infradead.org> (raw)
In-Reply-To: <1381762088-18880-1-git-send-email-treding@nvidia.com>
From: Randy Dunlap <rdunlap@infradead.org>
Fix build error when CONFIG_MTD_SPINAND_ONDIEECC is not enabled
by moving an inline function outside of that #ifdef block.
drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_read_byte':
drivers/staging/mt29f_spinand/mt29f_spinand.c:665:9: error: implicit declaration of function 'mtd_to_state' [-Werror=implicit-function-declaration]
drivers/staging/mt29f_spinand/mt29f_spinand.c:665:32: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_write_buf':
drivers/staging/mt29f_spinand/mt29f_spinand.c:700:32: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_read_buf':
drivers/staging/mt29f_spinand/mt29f_spinand.c:707:32: warning: initialization makes pointer from integer without a cast [enabled by default]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Kamlakant Patel <kamlakant.patel@broadcom.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mona Anonuevo <manonuevo@micron.com>
Cc: linux-mtd@lists.infradead.org
---
drivers/staging/mt29f_spinand/mt29f_spinand.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- next-2013-1014.orig/drivers/staging/mt29f_spinand/mt29f_spinand.c
+++ next-2013-1014/drivers/staging/mt29f_spinand/mt29f_spinand.c
@@ -28,9 +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)
{
@@ -41,6 +38,10 @@ static inline struct spinand_state *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 = {
next prev parent reply other threads:[~2013-10-14 19:40 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 14:48 linux-next: Tree for Oct 14 Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of the block tree Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of the drm-intel tree Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of the drm tree Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of th imx-mxs tree Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of the omap_dss2 tree Thierry Reding
2013-10-15 6:47 ` Tomi Valkeinen
2013-10-15 6:47 ` Tomi Valkeinen
2013-10-14 14:48 ` linux-next: manual merge of the pm tree Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of the spi tree Thierry Reding
2013-10-14 16:44 ` Mika Westerberg
2013-10-14 18:58 ` linux-next: Tree for Oct 14 (bcache) Randy Dunlap
2013-10-14 20:27 ` Mark Brown
[not found] ` <20131014202723.GQ2443-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-10-15 8:46 ` Thierry Reding
2013-10-15 8:46 ` Thierry Reding
[not found] ` <20131015084631.GK7856-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-15 9:36 ` Mark Brown
2013-10-15 9:36 ` Mark Brown
[not found] ` <525C3EC2.20404-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2013-10-15 8:44 ` Thierry Reding
2013-10-15 8:44 ` Thierry Reding
2013-10-14 19:36 ` [PATCH -next] netdev: inet_timewait_sock.h missing semi-colon when KMEMCHECK is enabled Randy Dunlap
2013-10-14 19:53 ` Joe Perches
2013-10-14 20:47 ` Randy Dunlap
2013-10-14 21:24 ` Joe Perches
2013-10-14 21:25 ` Joe Perches
2013-10-17 19:57 ` David Miller
2013-10-14 19:38 ` [PATCH -next] misc: fix various misc/mic/host/ build errors Randy Dunlap
2013-10-16 19:26 ` Greg Kroah-Hartman
2013-10-16 19:41 ` Randy Dunlap
2013-10-16 19:44 ` Greg Kroah-Hartman
2013-10-16 20:30 ` Thierry Reding
2013-10-16 20:37 ` Greg Kroah-Hartman
2013-10-17 14:02 ` Thierry Reding
2013-10-17 14:15 ` Greg Kroah-Hartman
2013-10-17 14:16 ` Mark Brown
2013-10-17 14:21 ` Thierry Reding
2013-10-17 14:49 ` Greg Kroah-Hartman
2013-10-16 20:47 ` Mark Brown
2013-10-14 19:39 ` Randy Dunlap [this message]
2013-10-14 19:39 ` [PATCH -next] staging/mt29f_spinand: fix build error when ONDIEECC not enabled Randy Dunlap
2013-10-14 20:51 ` linux-next: Tree for Oct 14 (ceph) Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=525C4879.4030705@infradead.org \
--to=rdunlap@infradead.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kamlakant.patel@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-next@vger.kernel.org \
--cc=manonuevo@micron.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.