potential parse error in ifdef
authorYoann Padioleau <padator@wanadoo.fr>
Fri, 1 Jun 2007 07:46:35 +0000 (00:46 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 1 Jun 2007 15:18:27 +0000 (08:18 -0700)
I have made a tool to parse the kernel that does not pre-process the
source.  That means that my parser tries to parse all the code, including
code in the #else branch or code that is not often compiled because the
driver is not very used (or not used at all).  So, my parser sometimes
reports parse error not originally detected by gcc.  Here is my (first)
patch.

[akpm@linux-foundation.org: fix amd8111e.c]
Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Acked-by: Matthew Wilcox <matthew@wil.cx>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: James Bottomley <James.Bottomley@steeleye.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/watchdog/ixp2000_wdt.c
drivers/mtd/devices/pmc551.c
drivers/mtd/nand/autcpu12.c
drivers/mtd/nand/ppchameleonevb.c
drivers/net/amd8111e.c
drivers/net/amd8111e.h
drivers/net/skfp/smt.c
drivers/scsi/aic7xxx/aic79xx_core.c
sound/arm/sa11xx-uda1341.c

index fd955dbd588cb75b5be420e24a644ffcedb6040e..dc7548dcaf3539cb0ae656fc49009e6927908e9b 100644 (file)
@@ -205,7 +205,7 @@ static void __exit ixp2000_wdt_exit(void)
 module_init(ixp2000_wdt_init);
 module_exit(ixp2000_wdt_exit);
 
-MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net">);
+MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>");
 MODULE_DESCRIPTION("IXP2000 Network Processor Watchdog");
 
 module_param(heartbeat, int, 0);
index a4873ab84e6bcc9fd73ef1cf8c17353e9b474b25..e8f686f7a357bd0e06a408dfb1b668d9a71c0317 100644 (file)
@@ -650,7 +650,7 @@ MODULE_DESCRIPTION(PMC551_VERSION);
  */
 static int msize = 0;
 #if defined(CONFIG_MTD_PMC551_APERTURE_SIZE)
-static int asize = CONFIG_MTD_PMC551_APERTURE_SIZE
+static int asize = CONFIG_MTD_PMC551_APERTURE_SIZE;
 #else
 static int asize = 0;
 #endif
index fe94ae9ae1f22d4feb409100726a4d8dadca5cb7..e3744eb8eccba4a68f3780379911a1eff7df2ef5 100644 (file)
@@ -101,7 +101,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd,
        struct nand_chip *chip = mtd->priv;
 
        if (ctrl & NAND_CTRL_CHANGE) {
-               void __iomem *addr
+               void __iomem *addr;
                unsigned char bits;
 
                addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
index eb7d4d443deb1b7cdcc6480f9653db79a637e6dd..38fe9e998ee571e604eaedef3b514085a64afcd1 100644 (file)
@@ -81,7 +81,7 @@ __setup("ppchameleonevb_fio_pbase=", ppchameleonevb_fio_pbase);
  */
 static struct mtd_partition partition_info_hi[] = {
       { .name = "PPChameleon HI Nand Flash",
-       offset = 0,
+       .offset = 0,
        .size = 128 * 1024 * 1024
       }
 };
index 675fe918421b69ca171964e9e0f41581d2601a8b..84b81642011ca9321c8e9f96d2ec91fc0296614c 100644 (file)
@@ -155,7 +155,7 @@ This function will write into PHY registers.
 */
 static int amd8111e_write_phy(struct amd8111e_priv* lp,int phy_id, int reg, u32 val)
 {
-       unsigned int repeat = REPEAT_CNT
+       unsigned int repeat = REPEAT_CNT;
        void __iomem *mmio = lp->mmio;
        unsigned int reg_val;
 
index 2007510c4eb6b97dd744a4487c8c3516997cefaf..e65080a5994a62010ec66fa79075997bb507e104 100644 (file)
@@ -615,7 +615,7 @@ typedef enum {
 #define SSTATE  2
 
 /* Assume contoller gets data 10 times the maximum processing time */
-#define  REPEAT_CNT                    10;
+#define  REPEAT_CNT                    10
 
 /* amd8111e decriptor flag definitions */
 typedef enum {
index fe847800acdcd85ac2a962668d6a0b19eadd7415..75afc1f07ba0ab2b70d263738759cb30c9b52fa9 100644 (file)
@@ -1748,7 +1748,7 @@ char *addr_to_string(struct fddi_addr *addr)
 #endif
 
 #ifdef AM29K
-smt_ifconfig(int argc, char *argv[])
+int smt_ifconfig(int argc, char *argv[])
 {
        if (argc >= 2 && !strcmp(argv[0],"opt_bypass") &&
            !strcmp(argv[1],"yes")) {
index 9ddc6e4a74b040d497620675f0cd5dfcf7256078..05f692bd0adc5543c236079d428bb0e48a503772 100644 (file)
@@ -5180,7 +5180,7 @@ ahd_handle_devreset(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
                        cur_lun = lun;
                        max_lun = lun;
                }
-               for (cur_lun <= max_lun; cur_lun++) {
+               for (;cur_lun <= max_lun; cur_lun++) {
                        struct ahd_tmode_lstate* lstate;
 
                        lstate = tstate->enabled_luns[cur_lun];
index c7e1b26461938eea09e0381fd0e83e213219fb4f..e7ed868fa7c0d4f50d5d1c7d87c117b4efc76569 100644 (file)
@@ -987,7 +987,7 @@ static int __init sa11xx_uda1341_init(void)
                if (platform_get_drvdata(device))
                        return 0;
                platform_device_unregister(device);
-               err = -ENODEV
+               err = -ENODEV;
        } else
                err = PTR_ERR(device);
        platform_driver_unregister(&sa11xx_uda1341_driver);