linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: mxc_nand: Fix warning on nr_parts unused variable
@ 2010-11-23 19:02 Fabio Estevam
  2010-11-29 14:51 ` Artem Bityutskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2010-11-23 19:02 UTC (permalink / raw)
  To: linux-mtd; +Cc: Fabio Estevam, dwmw2, u.kleine-koenig

If CONFIG_MTD_PARTITIONS is not selected, then the following warning is generated:

  CC      drivers/mtd/nand/mxc_nand.o
drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_probe':
drivers/mtd/nand/mxc_nand.c:1014: warning: unused variable 'nr_parts'

Fix it by marking nr_parts as __maybe_unused.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/mtd/nand/mxc_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 214b03a..ef932ba 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1009,7 +1009,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
 	struct mxc_nand_platform_data *pdata = pdev->dev.platform_data;
 	struct mxc_nand_host *host;
 	struct resource *res;
-	int err = 0, nr_parts = 0;
+	int err = 0, __maybe_unused nr_parts = 0;
 	struct nand_ecclayout *oob_smallpage, *oob_largepage;
 
 	/* Allocate memory for MTD device structure and private data */
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-29 15:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23 19:02 [PATCH] mtd: mxc_nand: Fix warning on nr_parts unused variable Fabio Estevam
2010-11-29 14:51 ` Artem Bityutskiy
2010-11-29 15:10   ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).