From: Adrian Bunk <bunk@stusta.de>

This patch makes needlessly global code static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 fs/asfs/asfs_fs.h |   12 ------------
 fs/asfs/extents.c |    4 +++-
 fs/asfs/inode.c   |   29 ++++++++++++++++++++++-------
 fs/asfs/objects.c |    4 +++-
 fs/asfs/super.c   |   18 +++++++++++++-----
 5 files changed, 41 insertions(+), 26 deletions(-)

diff -puN fs/asfs/asfs_fs.h~fs-asfs-make-code-static fs/asfs/asfs_fs.h
--- devel/fs/asfs/asfs_fs.h~fs-asfs-make-code-static	2005-08-08 22:19:53.000000000 -0700
+++ devel-akpm/fs/asfs/asfs_fs.h	2005-08-08 22:19:53.000000000 -0700
@@ -174,13 +174,6 @@ int asfs_file_release(struct inode *inod
 /* inode.c */
 struct inode *asfs_get_root_inode(struct super_block *sb);
 void asfs_read_locked_inode(struct inode *inode, void *arg);
-int asfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd);
-int asfs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
-int asfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname);
-int asfs_rmdir(struct inode *dir, struct dentry *dentry);
-int asfs_unlink(struct inode *dir, struct dentry *dentry);
-int asfs_rename(struct inode *old_dir, struct dentry *old_dentry,
-		struct inode *new_dir, struct dentry *new_dentry);
 int asfs_notify_change(struct dentry *dentry, struct iattr *attr);
 
 /* namei */
@@ -221,11 +214,6 @@ int asfs_truncateblocksinfile(struct sup
 /* super.c */
 struct super_block *asfs_read_super(struct super_block *sb, void *data,
 				    int silent);
-void asfs_put_super(struct super_block *sb);
-int asfs_statfs(struct super_block *sb, struct kstatfs *buf);
-int asfs_remount(struct super_block *sb, int *flags, char *data);
-struct inode *asfs_alloc_inode(struct super_block *sb);
-void asfs_destroy_inode(struct inode *inode);
 
 /* symlink.c */
 int asfs_symlink_readpage(struct file *file, struct page *page);
diff -puN fs/asfs/extents.c~fs-asfs-make-code-static fs/asfs/extents.c
--- devel/fs/asfs/extents.c~fs-asfs-make-code-static	2005-08-08 22:19:53.000000000 -0700
+++ devel-akpm/fs/asfs/extents.c	2005-08-08 22:19:53.000000000 -0700
@@ -271,7 +271,9 @@ static int splitbtreecontainer(struct su
 
 /* Returns created extentbnode - returned_bh need to saved and realesed in caller funkction! */
 
-int createextentbnode(struct super_block *sb, u32 key, struct buffer_head **returned_bh, struct BNode **returned_bnode)
+static int createextentbnode(struct super_block *sb, u32 key,
+			     struct buffer_head **returned_bh,
+			     struct BNode **returned_bnode)
 {
 	int errorcode;
 
diff -puN fs/asfs/inode.c~fs-asfs-make-code-static fs/asfs/inode.c
--- devel/fs/asfs/inode.c~fs-asfs-make-code-static	2005-08-08 22:19:53.000000000 -0700
+++ devel-akpm/fs/asfs/inode.c	2005-08-08 22:19:53.000000000 -0700
@@ -26,6 +26,18 @@
 
 #include <asm/byteorder.h>
 
+#ifdef CONFIG_ASFS_RW
+static int asfs_create(struct inode *dir, struct dentry *dentry,
+		       int mode, struct nameidata *nd);
+static int asfs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
+static int asfs_symlink(struct inode *dir, struct dentry *dentry,
+			const char *symname);
+static int asfs_unlink(struct inode *dir, struct dentry *dentry);
+static int asfs_rmdir(struct inode *dir, struct dentry *dentry);
+static int asfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+		       struct inode *new_dir, struct dentry *new_dentry);
+#endif /*  CONFIG_ASFS_RW  */
+
 /* Mapping from our types to the kernel */
 
 static struct address_space_operations asfs_aops = {
@@ -277,22 +289,24 @@ static int asfs_create_object(struct ino
 	return error;
 }
 
-int asfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
+static int asfs_create(struct inode *dir, struct dentry *dentry,
+		       int mode, struct nameidata *nd)
 {
 	return asfs_create_object(dir, dentry, mode, it_file, NULL);
 }
 
-int asfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+static int asfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 {
 	return asfs_create_object(dir, dentry, mode, it_dir, NULL);
 }
 
-int asfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
+static int asfs_symlink(struct inode *dir, struct dentry *dentry,
+			const char *symname)
 {
 	return asfs_create_object(dir, dentry, 0, it_link, symname);
 }
 
-int asfs_rmdir(struct inode *dir, struct dentry *dentry)
+static int asfs_rmdir(struct inode *dir, struct dentry *dentry)
 {
 	asfs_debug("ASFS: %s\n", __FUNCTION__);
 
@@ -302,7 +316,7 @@ int asfs_rmdir(struct inode *dir, struct
 	return asfs_unlink(dir, dentry);
 }
 
-int asfs_unlink(struct inode *dir, struct dentry *dentry)
+static int asfs_unlink(struct inode *dir, struct dentry *dentry)
 {
 	struct inode *inode = dentry->d_inode;
 	int error;
@@ -341,7 +355,8 @@ int asfs_unlink(struct inode *dir, struc
 	return 0;
 }
 
-int asfs_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry)
+static int asfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+		       struct inode *new_dir, struct dentry *new_dentry)
 {
 	struct super_block *sb = old_dir->i_sb;
 	struct buffer_head *src_bh, *old_bh, *new_bh;
@@ -411,7 +426,7 @@ int asfs_rename(struct inode *old_dir, s
 }
 
 /*
-int asfs_notify_change(struct dentry *dentry, struct iattr *attr)
+static int asfs_notify_change(struct dentry *dentry, struct iattr *attr)
 {
 	struct inode *inode = dentry->d_inode;
 	int error = 0;
diff -puN fs/asfs/objects.c~fs-asfs-make-code-static fs/asfs/objects.c
--- devel/fs/asfs/objects.c~fs-asfs-make-code-static	2005-08-08 22:19:53.000000000 -0700
+++ devel-akpm/fs/asfs/objects.c	2005-08-08 22:19:53.000000000 -0700
@@ -54,7 +54,9 @@ struct fsObject *asfs_find_obj_by_name(s
 
 #ifdef CONFIG_ASFS_RW
 
-struct fsObject *find_obj_by_node(struct super_block *sb, struct fsObjectContainer *objcont, u32 objnode)
+static struct fsObject *find_obj_by_node(struct super_block *sb,
+					 struct fsObjectContainer *objcont,
+					 u32 objnode)
 {
 	struct fsObject *obj;
 
diff -puN fs/asfs/super.c~fs-asfs-make-code-static fs/asfs/super.c
--- devel/fs/asfs/super.c~fs-asfs-make-code-static	2005-08-08 22:19:53.000000000 -0700
+++ devel-akpm/fs/asfs/super.c	2005-08-08 22:19:53.000000000 -0700
@@ -67,6 +67,14 @@
 static char asfs_default_codepage[] = CONFIG_ASFS_DEFAULT_CODEPAGE;
 static char asfs_default_iocharset[] = CONFIG_NLS_DEFAULT;
 
+static struct inode *asfs_alloc_inode(struct super_block *sb);
+static void asfs_destroy_inode(struct inode *inode);
+static void asfs_put_super(struct super_block *sb);
+static int asfs_statfs(struct super_block *sb, struct kstatfs *buf);
+#ifdef CONFIG_ASFS_RW
+static int asfs_remount(struct super_block *sb, int *flags, char *data);
+#endif
+
 u32 asfs_calcchecksum(void *block, u32 blocksize)
 {
 	u32 *data = block, checksum = 1;
@@ -340,7 +348,7 @@ out:
 }
 
 #ifdef CONFIG_ASFS_RW
-int asfs_remount(struct super_block *sb, int *flags, char *data)
+static int asfs_remount(struct super_block *sb, int *flags, char *data)
 {
 	asfs_debug("ASFS: remount (flags=0x%x, opts=\"%s\")\n",*flags,data);
 
@@ -362,7 +370,7 @@ int asfs_remount(struct super_block *sb,
 }
 #endif
 
-void asfs_put_super(struct super_block *sb)
+static void asfs_put_super(struct super_block *sb)
 {
 	struct asfs_sb_info *sbi = ASFS_SB(sb);
 
@@ -385,7 +393,7 @@ void asfs_put_super(struct super_block *
 }
 
 /* That's simple too. */
-int asfs_statfs(struct super_block *sb, struct kstatfs *buf)
+static int asfs_statfs(struct super_block *sb, struct kstatfs *buf)
 {
 	buf->f_type = ASFS_MAGIC;
 	buf->f_bsize = sb->s_blocksize;
@@ -398,7 +406,7 @@ int asfs_statfs(struct super_block *sb, 
 /* --- new in 2.6.x --- */
 static kmem_cache_t * asfs_inode_cachep;
 
-struct inode *asfs_alloc_inode(struct super_block *sb)
+static struct inode *asfs_alloc_inode(struct super_block *sb)
 {
 	struct asfs_inode_info *ei;
 	ei = (struct asfs_inode_info *)kmem_cache_alloc(asfs_inode_cachep, SLAB_KERNEL);
@@ -407,7 +415,7 @@ struct inode *asfs_alloc_inode(struct su
 	return &ei->vfs_inode;
 }
 
-void asfs_destroy_inode(struct inode *inode)
+static void asfs_destroy_inode(struct inode *inode)
 {
 	kmem_cache_free(asfs_inode_cachep, ASFS_I(inode));
 }
_