Commit 632155e6 authored by Yoann Padioleau's avatar Yoann Padioleau Committed by Linus Torvalds

potential parse error in ifdef

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: default avatarYoann Padioleau <padator@wanadoo.fr>
Acked-by: default avatarMatthew Wilcox <matthew@wil.cx>
Acked-by: default avatarWim Van Sebroeck <wim@iguana.be>
Acked-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Acked-by: default avatarJeff Garzik <jeff@garzik.org>
Acked-by: default avatarJames Bottomley <James.Bottomley@steeleye.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 78b7611c
...@@ -205,7 +205,7 @@ static void __exit ixp2000_wdt_exit(void) ...@@ -205,7 +205,7 @@ static void __exit ixp2000_wdt_exit(void)
module_init(ixp2000_wdt_init); module_init(ixp2000_wdt_init);
module_exit(ixp2000_wdt_exit); 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_DESCRIPTION("IXP2000 Network Processor Watchdog");
module_param(heartbeat, int, 0); module_param(heartbeat, int, 0);
......
...@@ -650,7 +650,7 @@ MODULE_DESCRIPTION(PMC551_VERSION); ...@@ -650,7 +650,7 @@ MODULE_DESCRIPTION(PMC551_VERSION);
*/ */
static int msize = 0; static int msize = 0;
#if defined(CONFIG_MTD_PMC551_APERTURE_SIZE) #if defined(CONFIG_MTD_PMC551_APERTURE_SIZE)
static int asize = CONFIG_MTD_PMC551_APERTURE_SIZE static int asize = CONFIG_MTD_PMC551_APERTURE_SIZE;
#else #else
static int asize = 0; static int asize = 0;
#endif #endif
......
...@@ -101,7 +101,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd, ...@@ -101,7 +101,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd,
struct nand_chip *chip = mtd->priv; struct nand_chip *chip = mtd->priv;
if (ctrl & NAND_CTRL_CHANGE) { if (ctrl & NAND_CTRL_CHANGE) {
void __iomem *addr void __iomem *addr;
unsigned char bits; unsigned char bits;
addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET; addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
......
...@@ -81,7 +81,7 @@ __setup("ppchameleonevb_fio_pbase=", ppchameleonevb_fio_pbase); ...@@ -81,7 +81,7 @@ __setup("ppchameleonevb_fio_pbase=", ppchameleonevb_fio_pbase);
*/ */
static struct mtd_partition partition_info_hi[] = { static struct mtd_partition partition_info_hi[] = {
{ .name = "PPChameleon HI Nand Flash", { .name = "PPChameleon HI Nand Flash",
offset = 0, .offset = 0,
.size = 128 * 1024 * 1024 .size = 128 * 1024 * 1024
} }
}; };
......
...@@ -155,7 +155,7 @@ This function will write into PHY registers. ...@@ -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) 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; void __iomem *mmio = lp->mmio;
unsigned int reg_val; unsigned int reg_val;
......
...@@ -615,7 +615,7 @@ typedef enum { ...@@ -615,7 +615,7 @@ typedef enum {
#define SSTATE 2 #define SSTATE 2
/* Assume contoller gets data 10 times the maximum processing time */ /* Assume contoller gets data 10 times the maximum processing time */
#define REPEAT_CNT 10; #define REPEAT_CNT 10
/* amd8111e decriptor flag definitions */ /* amd8111e decriptor flag definitions */
typedef enum { typedef enum {
......
...@@ -1748,7 +1748,7 @@ char *addr_to_string(struct fddi_addr *addr) ...@@ -1748,7 +1748,7 @@ char *addr_to_string(struct fddi_addr *addr)
#endif #endif
#ifdef AM29K #ifdef AM29K
smt_ifconfig(int argc, char *argv[]) int smt_ifconfig(int argc, char *argv[])
{ {
if (argc >= 2 && !strcmp(argv[0],"opt_bypass") && if (argc >= 2 && !strcmp(argv[0],"opt_bypass") &&
!strcmp(argv[1],"yes")) { !strcmp(argv[1],"yes")) {
......
...@@ -5180,7 +5180,7 @@ ahd_handle_devreset(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, ...@@ -5180,7 +5180,7 @@ ahd_handle_devreset(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
cur_lun = lun; cur_lun = lun;
max_lun = lun; max_lun = lun;
} }
for (cur_lun <= max_lun; cur_lun++) { for (;cur_lun <= max_lun; cur_lun++) {
struct ahd_tmode_lstate* lstate; struct ahd_tmode_lstate* lstate;
lstate = tstate->enabled_luns[cur_lun]; lstate = tstate->enabled_luns[cur_lun];
......
...@@ -987,7 +987,7 @@ static int __init sa11xx_uda1341_init(void) ...@@ -987,7 +987,7 @@ static int __init sa11xx_uda1341_init(void)
if (platform_get_drvdata(device)) if (platform_get_drvdata(device))
return 0; return 0;
platform_device_unregister(device); platform_device_unregister(device);
err = -ENODEV err = -ENODEV;
} else } else
err = PTR_ERR(device); err = PTR_ERR(device);
platform_driver_unregister(&sa11xx_uda1341_driver); platform_driver_unregister(&sa11xx_uda1341_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment