
From: Anton Blanchard <anton@samba.org>

gcc 3.5 is warning about static vs non static function declarations.  The
following patch removes function prototypes in .h files where possible and
changes prototypes to be static elsewhere.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/net/pppoe.c                      |    1 +
 25-akpm/drivers/serial/8250.c                    |    2 +-
 25-akpm/drivers/usb/input/hiddev.c               |    3 ---
 25-akpm/fs/cifs/cifsfs.c                         |    2 --
 25-akpm/include/linux/idr.h                      |    2 --
 25-akpm/include/linux/if_pppox.h                 |    2 --
 25-akpm/include/linux/netfilter_ipv4/ip_tables.h |    2 --
 25-akpm/include/linux/sunrpc/svcauth.h           |    1 -
 25-akpm/net/ipv4/xfrm4_state.c                   |    2 +-
 25-akpm/net/netlink/af_netlink.c                 |    2 +-
 10 files changed, 4 insertions(+), 15 deletions(-)

diff -puN drivers/net/pppoe.c~gcc-35-fixes drivers/net/pppoe.c
--- 25/drivers/net/pppoe.c~gcc-35-fixes	2004-07-04 00:03:40.916763480 -0700
+++ 25-akpm/drivers/net/pppoe.c	2004-07-04 00:03:40.934760744 -0700
@@ -86,6 +86,7 @@ static int __pppoe_xmit(struct sock *sk,
 static struct proto_ops pppoe_ops;
 static rwlock_t pppoe_hash_lock = RW_LOCK_UNLOCKED;
 
+static struct ppp_channel_ops pppoe_chan_ops;
 
 static inline int cmp_2_addr(struct pppoe_addr *a, struct pppoe_addr *b)
 {
diff -puN drivers/serial/8250.c~gcc-35-fixes drivers/serial/8250.c
--- 25/drivers/serial/8250.c~gcc-35-fixes	2004-07-04 00:03:40.918763176 -0700
+++ 25-akpm/drivers/serial/8250.c	2004-07-04 00:03:40.935760592 -0700
@@ -2017,7 +2017,7 @@ static int __init serial8250_console_set
 	return uart_set_options(port, co, baud, parity, bits, flow);
 }
 
-extern struct uart_driver serial8250_reg;
+static struct uart_driver serial8250_reg;
 static struct console serial8250_console = {
 	.name		= "ttyS",
 	.write		= serial8250_console_write,
diff -puN drivers/usb/input/hiddev.c~gcc-35-fixes drivers/usb/input/hiddev.c
--- 25/drivers/usb/input/hiddev.c~gcc-35-fixes	2004-07-04 00:03:40.920762872 -0700
+++ 25-akpm/drivers/usb/input/hiddev.c	2004-07-04 00:03:40.936760440 -0700
@@ -66,9 +66,6 @@ struct hiddev_list {
 
 static struct hiddev *hiddev_table[HIDDEV_MINORS];
 
-/* forward reference to make our lives easier */
-extern struct usb_driver hiddev_driver;
-
 /*
  * Find a report, given the report's type and ID.  The ID can be specified
  * indirectly by REPORT_ID_FIRST (which returns the first report of the given
diff -puN fs/cifs/cifsfs.c~gcc-35-fixes fs/cifs/cifsfs.c
--- 25/fs/cifs/cifsfs.c~gcc-35-fixes	2004-07-04 00:03:40.921762720 -0700
+++ 25-akpm/fs/cifs/cifsfs.c	2004-07-04 00:03:40.937760288 -0700
@@ -48,8 +48,6 @@
 static struct quotactl_ops cifs_quotactl_ops;
 #endif
 
-extern struct file_system_type cifs_fs_type;
-
 int cifsFYI = 0;
 int cifsERROR = 1;
 int traceSMB = 0;
diff -puN include/linux/idr.h~gcc-35-fixes include/linux/idr.h
--- 25/include/linux/idr.h~gcc-35-fixes	2004-07-04 00:03:40.923762416 -0700
+++ 25-akpm/include/linux/idr.h	2004-07-04 00:03:40.937760288 -0700
@@ -76,5 +76,3 @@ int idr_get_new(struct idr *idp, void *p
 int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id);
 void idr_remove(struct idr *idp, int id);
 void idr_init(struct idr *idp);
-
-extern kmem_cache_t *idr_layer_cache;
diff -puN include/linux/if_pppox.h~gcc-35-fixes include/linux/if_pppox.h
--- 25/include/linux/if_pppox.h~gcc-35-fixes	2004-07-04 00:03:40.925762112 -0700
+++ 25-akpm/include/linux/if_pppox.h	2004-07-04 00:03:40.938760136 -0700
@@ -159,8 +159,6 @@ enum {
     PPPOX_DEAD		= 16  /* dead, useless, please clean me up!*/
 };
 
-extern struct ppp_channel_ops pppoe_chan_ops;
-
 #endif /* __KERNEL__ */
 
 #endif /* !(__LINUX_IF_PPPOX_H) */
diff -puN include/linux/netfilter_ipv4/ip_tables.h~gcc-35-fixes include/linux/netfilter_ipv4/ip_tables.h
--- 25/include/linux/netfilter_ipv4/ip_tables.h~gcc-35-fixes	2004-07-04 00:03:40.926761960 -0700
+++ 25-akpm/include/linux/netfilter_ipv4/ip_tables.h	2004-07-04 00:03:40.938760136 -0700
@@ -284,8 +284,6 @@ struct ipt_get_entries
 	struct ipt_entry entrytable[0];
 };
 
-extern struct semaphore ipt_mutex;
-
 /* Standard return verdict, or do jump. */
 #define IPT_STANDARD_TARGET ""
 /* Error verdict. */
diff -puN include/linux/sunrpc/svcauth.h~gcc-35-fixes include/linux/sunrpc/svcauth.h
--- 25/include/linux/sunrpc/svcauth.h~gcc-35-fixes	2004-07-04 00:03:40.927761808 -0700
+++ 25-akpm/include/linux/sunrpc/svcauth.h	2004-07-04 00:03:40.939759984 -0700
@@ -93,7 +93,6 @@ struct auth_ops {
 	int	(*release)(struct svc_rqst *rq);
 	void	(*domain_release)(struct auth_domain *);
 };
-extern struct auth_ops	*authtab[RPC_AUTH_MAXFLAVOR];
 
 #define	SVC_GARBAGE	1
 #define	SVC_SYSERR	2
diff -puN net/ipv4/xfrm4_state.c~gcc-35-fixes net/ipv4/xfrm4_state.c
--- 25/net/ipv4/xfrm4_state.c~gcc-35-fixes	2004-07-04 00:03:40.929761504 -0700
+++ 25-akpm/net/ipv4/xfrm4_state.c	2004-07-04 00:03:40.939759984 -0700
@@ -11,7 +11,7 @@
 #include <linux/pfkeyv2.h>
 #include <linux/ipsec.h>
 
-extern struct xfrm_state_afinfo xfrm4_state_afinfo;
+static struct xfrm_state_afinfo xfrm4_state_afinfo;
 
 static void
 __xfrm4_init_tempsel(struct xfrm_state *x, struct flowi *fl,
diff -puN net/netlink/af_netlink.c~gcc-35-fixes net/netlink/af_netlink.c
--- 25/net/netlink/af_netlink.c~gcc-35-fixes	2004-07-04 00:03:40.930761352 -0700
+++ 25-akpm/net/netlink/af_netlink.c	2004-07-04 00:03:40.940759832 -0700
@@ -176,7 +176,7 @@ found:
 	return sk;
 }
 
-extern struct proto_ops netlink_ops;
+static struct proto_ops netlink_ops;
 
 static int netlink_insert(struct sock *sk, u32 pid)
 {
_
