From 632155e659449685b719995d7e7081cff7b01aba Mon Sep 17 00:00:00 2001 From: Yoann Padioleau Date: Fri, 1 Jun 2007 00:46:35 -0700 Subject: 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: Yoann Padioleau Acked-by: Matthew Wilcox Acked-by: Wim Van Sebroeck Acked-by: David Woodhouse Acked-by: Jeff Garzik Acked-by: James Bottomley Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/net/amd8111e.c | 2 +- drivers/net/amd8111e.h | 2 +- drivers/net/skfp/smt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index 675fe91..84b8164 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c @@ -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; diff --git a/drivers/net/amd8111e.h b/drivers/net/amd8111e.h index 2007510..e65080a 100644 --- a/drivers/net/amd8111e.h +++ b/drivers/net/amd8111e.h @@ -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 { diff --git a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c index fe84780..75afc1f 100644 --- a/drivers/net/skfp/smt.c +++ b/drivers/net/skfp/smt.c @@ -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")) { -- cgit v1.1