[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200805262035.49139.toralf.foerster@gmx.de>
Date: Mon, 26 May 2008 20:35:46 +0200
From: Toralf Förster <toralf.foerster@....de>
To: dwmw2@...radead.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] MTD: fix 2 "unused variable" warnings in cafe_nand.c
Hello,
pointed out by Sebastian Siewior the original patch produces the compiler
warning "ISO C90 forbids mixed declarations and code" therefore here the 2nd
attempt to fix 2 compiler warnings about unused variables if
CONFIG_MTD_PARTITIONS is undefined.
BTW I'm wondering whether the devs prefer to live w/ the warning rather than
having the 2 additional #ifdef pragmas or not.
Signed-off-by: Toralf Förster <toralf.foerster@....de>
---
drivers/mtd/nand/cafe_nand.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
index da6ceaa..5c29d36 100644
--- a/drivers/mtd/nand/cafe_nand.c
+++ b/drivers/mtd/nand/cafe_nand.c
@@ -626,10 +626,12 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
{
struct mtd_info *mtd;
struct cafe_priv *cafe;
- struct mtd_partition *parts;
uint32_t ctrl;
- int nr_parts;
int err = 0;
+#ifdef CONFIG_MTD_PARTITIONS
+ struct mtd_partition *parts;
+ int nr_parts;
+#endif
/* Very old versions shared the same PCI ident for all three
functions on the chip. Verify the class too... */
--
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
Download attachment "signature.asc " of type "application/pgp-signature" (198 bytes)
Powered by blists - more mailing lists