All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org
Subject: [PATCH 1/4] Inconsistent extern declarations.
Date: Thu, 24 Aug 2006 16:25:18 +0100	[thread overview]
Message-ID: <1156433118.3012.117.camel@pmac.infradead.org> (raw)
In-Reply-To: <1156429585.3012.58.camel@pmac.infradead.org>

When you compile multiple files together with --combine, the compiler
starts to _notice_ when you do things like this in one file:

 extern int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx,
                                struct iovec *iov, int len, int noblock);

.. but the actual function looks like this:

 extern int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx,
                                struct iovec *iov, size_t len, int noblock);

This fixes a bunch of those, which are mostly just a missing 'const' on
the extern declaration.

This patch is a bug-fix which is fairly much independent of the
--combine/-fwhole-program stuff, so can be applied today.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>

diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index e103503..f647ec3 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -369,11 +369,11 @@ #endif /* MODULE */
 
 int nrcards;
 
-extern char *l1_revision;
-extern char *l2_revision;
-extern char *l3_revision;
-extern char *lli_revision;
-extern char *tei_revision;
+extern const char *l1_revision;
+extern const char *l2_revision;
+extern const char *l3_revision;
+extern const char *lli_revision;
+extern const char *tei_revision;
 
 char *HiSax_getrev(const char *revision)
 {
diff --git a/drivers/net/skfp/smtinit.c b/drivers/net/skfp/smtinit.c
index 3c8964c..01bf76b 100644
--- a/drivers/net/skfp/smtinit.c
+++ b/drivers/net/skfp/smtinit.c
@@ -36,7 +36,7 @@ #endif
 
 #ifndef MULT_OEM
 #define OEMID(smc,i)	oem_id[i]
-	extern u_char	oem_id[] ;
+	extern const u_char	oem_id[] ;
 #else	/* MULT_OEM */
 #define OEMID(smc,i)	smc->hw.oem_id->oi_mark[i]
 	extern struct s_oem_ids	oem_ids[] ;
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index e8ae304..8a15f70 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -27,7 +27,7 @@ #include <linux/debugfs.h>
 #define DEBUGFS_MAGIC	0x64626720
 
 /* declared over in file.c */
-extern struct file_operations debugfs_file_operations;
+extern const struct file_operations debugfs_file_operations;
 
 static struct vfsmount *debugfs_mount;
 static int debugfs_mount_count;
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index 924ecde..99f3120 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -269,7 +269,7 @@ static int hfsplus_file_release(struct i
 }
 
 extern struct inode_operations hfsplus_dir_inode_operations;
-extern struct file_operations hfsplus_dir_operations;
+extern const struct file_operations hfsplus_dir_operations;
 
 static struct inode_operations hfsplus_file_inode_operations = {
 	.lookup		= hfsplus_file_lookup,
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c
index 9aabcc0..68ab9c0 100644
--- a/fs/reiserfs/dir.c
+++ b/fs/reiserfs/dir.c
@@ -11,7 +11,7 @@ #include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
 #include <asm/uaccess.h>
 
-extern struct reiserfs_key MIN_KEY;
+extern const struct reiserfs_key MIN_KEY;
 
 static int reiserfs_readdir(struct file *, void *, filldir_t);
 static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry,
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 0253413..1316556 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -22,7 +22,7 @@ extern __u32 sysctl_rmem_max;
 extern int sysctl_core_destroy_delay;
 
 #ifdef CONFIG_NET_DIVERT
-extern char sysctl_divert_version[];
+extern const char sysctl_divert_version[];
 #endif /* CONFIG_NET_DIVERT */
 
 #ifdef CONFIG_XFRM
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index aa34ff4..94b3cb8 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -87,7 +87,7 @@ extern int ipxrtr_add_route(__u32 networ
 			    unsigned char *node);
 extern void ipxrtr_del_routes(struct ipx_interface *intrfc);
 extern int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx,
-			       struct iovec *iov, int len, int noblock);
+			       struct iovec *iov, size_t len, int noblock);
 extern int ipxrtr_route_skb(struct sk_buff *skb);
 extern struct ipx_route *ipxrtr_lookup(__u32 net);
 extern int ipxrtr_ioctl(unsigned int cmd, void __user *arg);
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c
index 86805c3..7606ee7 100644
--- a/net/irda/irsysctl.c
+++ b/net/irda/irsysctl.c
@@ -44,9 +44,9 @@ extern int  sysctl_slot_timeout;
 extern int  sysctl_fast_poll_increase;
 extern char sysctl_devname[];
 extern int  sysctl_max_baud_rate;
-extern int  sysctl_min_tx_turn_time;
-extern int  sysctl_max_tx_data_size;
-extern int  sysctl_max_tx_window;
+extern unsigned  sysctl_min_tx_turn_time;
+extern unsigned  sysctl_max_tx_data_size;
+extern unsigned  sysctl_max_tx_window;
 extern int  sysctl_max_noreply_time;
 extern int  sysctl_warn_noreply_time;
 extern int  sysctl_lap_keepalive_time;
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 1ab03a2..2a3657b 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -83,11 +83,11 @@ kmem_cache_t *sctp_chunk_cachep __read_m
 kmem_cache_t *sctp_bucket_cachep __read_mostly;
 
 extern int sctp_snmp_proc_init(void);
-extern int sctp_snmp_proc_exit(void);
+extern void sctp_snmp_proc_exit(void);
 extern int sctp_eps_proc_init(void);
-extern int sctp_eps_proc_exit(void);
+extern void sctp_eps_proc_exit(void);
 extern int sctp_assocs_proc_init(void);
-extern int sctp_assocs_proc_exit(void);
+extern void sctp_assocs_proc_exit(void);
 
 /* Return the address of the control sock. */
 struct sock *sctp_get_ctl_sock(void)


-- 
dwmw2


  parent reply	other threads:[~2006-08-24 15:25 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1156429585.3012.58.camel@pmac.infradead.org>
2006-08-24 15:24 ` [PATCH 0/4] Compile kernel with -fwhole-program --combine David Woodhouse
2006-08-24 16:48   ` Jan Engelhardt
2006-08-24 17:05     ` David Woodhouse
2006-08-25  6:01       ` Jan Engelhardt
2006-08-25  7:26         ` Sam Ravnborg
2006-08-25 10:14           ` David Woodhouse
2006-08-25  8:55         ` David Woodhouse
2006-08-25  9:11           ` Jan Engelhardt
2006-08-25  9:45             ` David Woodhouse
2006-08-25  9:51               ` Jan Engelhardt
2006-08-25 10:01                 ` David Woodhouse
2006-08-24 17:15     ` [OLPC-devel] " Arnd Bergmann
2006-08-24 17:25       ` David Woodhouse
2006-08-24 21:49   ` Adrian Bunk
2006-08-24 21:54     ` David Woodhouse
2006-08-25 20:11   ` Rob Landley
2006-08-25 20:35     ` David Woodhouse
2006-08-26  1:59       ` Segher Boessenkool
2006-08-28 10:52       ` Helge Hafting
2006-08-28 11:03         ` Jan Engelhardt
2006-08-28 11:21         ` David Woodhouse
2006-09-01 19:35           ` Ian Stirling
2006-09-01 21:15             ` David Woodhouse
2006-08-24 15:25 ` David Woodhouse [this message]
2006-08-24 16:13   ` [PATCH 1/4] Inconsistent extern declarations Alexey Dobriyan
2006-08-24 17:50     ` David Woodhouse
2006-08-24 21:17   ` Adrian Bunk
2006-08-24 15:26 ` [PATCH 2/4] Core support for --combine -fwhole-program David Woodhouse
2006-08-24 17:27   ` Josh Triplett
2006-08-24 17:33     ` David Woodhouse
2006-08-24 21:33   ` Adrian Bunk
2006-08-25  9:37     ` David Woodhouse
2006-08-25 10:30       ` Adrian Bunk
2006-08-25 10:40         ` David Woodhouse
2006-08-24 15:26 ` [PATCH 3/4] Add __global tag where needed David Woodhouse
2006-08-24 21:30   ` Adrian Bunk
2006-08-25  9:52     ` David Woodhouse
2006-08-25 10:26       ` Adrian Bunk
2006-08-25 10:34         ` David Woodhouse
2006-08-25 10:50           ` Adrian Bunk
2006-08-24 15:28 ` [PATCH 4/4] Some extra --combine hacks David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1156433118.3012.117.camel@pmac.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.