MTD: fix 2 "unused variable" warnings in cafe_nand.c
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/mtd/nand/cafe_nand.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/mtd/nand/cafe_nand.c +4 -2
@@ -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... */
Signature · 4 lines
MfG/Sincerely Toralf Förster pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3