From: Adrian Bunk The patch below makes some needlessly global functions static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton --- 25-akpm/fs/smbfs/inode.c | 2 +- 25-akpm/fs/smbfs/proc.c | 6 +++--- 25-akpm/fs/smbfs/proto.h | 5 ----- 25-akpm/fs/smbfs/request.c | 6 ++++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff -puN fs/smbfs/inode.c~smbfs-make-some-functions-static fs/smbfs/inode.c --- 25/fs/smbfs/inode.c~smbfs-make-some-functions-static 2005-01-10 17:29:38.252071720 -0800 +++ 25-akpm/fs/smbfs/inode.c 2005-01-10 17:29:38.261070352 -0800 @@ -493,7 +493,7 @@ smb_put_super(struct super_block *sb) smb_kfree(server); } -int smb_fill_super(struct super_block *sb, void *raw_data, int silent) +static int smb_fill_super(struct super_block *sb, void *raw_data, int silent) { struct smb_sb_info *server; struct smb_mount_data_kernel *mnt; diff -puN fs/smbfs/proc.c~smbfs-make-some-functions-static fs/smbfs/proc.c --- 25/fs/smbfs/proc.c~smbfs-make-some-functions-static 2005-01-10 17:29:38.254071416 -0800 +++ 25-akpm/fs/smbfs/proc.c 2005-01-10 17:29:38.263070048 -0800 @@ -74,7 +74,7 @@ smb_proc_setattr_core(struct smb_sb_info static int smb_proc_setattr_ext(struct smb_sb_info *server, struct inode *inode, struct smb_fattr *fattr); -int +static int smb_proc_query_cifsunix(struct smb_sb_info *server); static void install_ops(struct smb_ops *dst, struct smb_ops *src); @@ -2075,7 +2075,7 @@ out: return result; } -void smb_decode_unix_basic(struct smb_fattr *fattr, struct smb_sb_info *server, char *p) +static void smb_decode_unix_basic(struct smb_fattr *fattr, struct smb_sb_info *server, char *p) { u64 size, disk_bytes; @@ -3392,7 +3392,7 @@ out: return result; } -int +static int smb_proc_query_cifsunix(struct smb_sb_info *server) { int result; diff -puN fs/smbfs/proto.h~smbfs-make-some-functions-static fs/smbfs/proto.h --- 25/fs/smbfs/proto.h~smbfs-make-some-functions-static 2005-01-10 17:29:38.256071112 -0800 +++ 25-akpm/fs/smbfs/proto.h 2005-01-10 17:29:38.264069896 -0800 @@ -25,7 +25,6 @@ extern int smb_proc_unlink(struct dentry extern int smb_proc_flush(struct smb_sb_info *server, __u16 fileid); extern void smb_init_root_dirent(struct smb_sb_info *server, struct smb_fattr *fattr, struct super_block *sb); -extern void smb_decode_unix_basic(struct smb_fattr *fattr, struct smb_sb_info *server, char *p); extern int smb_proc_getattr(struct dentry *dir, struct smb_fattr *fattr); extern int smb_proc_setattr(struct dentry *dir, struct smb_fattr *fattr); extern int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, unsigned int major, unsigned int minor); @@ -34,7 +33,6 @@ extern int smb_proc_dskattr(struct super extern int smb_proc_read_link(struct smb_sb_info *server, struct dentry *d, char *buffer, int len); extern int smb_proc_symlink(struct smb_sb_info *server, struct dentry *d, const char *oldpath); extern int smb_proc_link(struct smb_sb_info *server, struct dentry *dentry, struct dentry *new_dentry); -extern int smb_proc_query_cifsunix(struct smb_sb_info *server); extern void smb_install_null_ops(struct smb_ops *ops); /* dir.c */ extern struct file_operations smb_dir_operations; @@ -62,7 +60,6 @@ extern void smb_get_inode_attr(struct in extern void smb_set_inode_attr(struct inode *inode, struct smb_fattr *fattr); extern void smb_invalidate_inodes(struct smb_sb_info *server); extern int smb_revalidate_inode(struct dentry *dentry); -extern int smb_fill_super(struct super_block *sb, void *raw_data, int silent); extern int smb_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat); extern int smb_notify_change(struct dentry *dentry, struct iattr *attr); /* file.c */ @@ -81,10 +78,8 @@ extern int smbiod_retry(struct smb_sb_in extern int smb_init_request_cache(void); extern void smb_destroy_request_cache(void); extern struct smb_request *smb_alloc_request(struct smb_sb_info *server, int bufsize); -extern void smb_rget(struct smb_request *req); extern void smb_rput(struct smb_request *req); extern int smb_add_request(struct smb_request *req); -extern int smb_request_send_req(struct smb_request *req); extern int smb_request_send_server(struct smb_sb_info *server); extern int smb_request_recv(struct smb_sb_info *server); /* symlink.c */ diff -puN fs/smbfs/request.c~smbfs-make-some-functions-static fs/smbfs/request.c --- 25/fs/smbfs/request.c~smbfs-make-some-functions-static 2005-01-10 17:29:38.257070960 -0800 +++ 25-akpm/fs/smbfs/request.c 2005-01-10 17:29:38.265069744 -0800 @@ -27,6 +27,8 @@ /* cache for request structures */ static kmem_cache_t *req_cachep; +static int smb_request_send_req(struct smb_request *req); + /* /proc/slabinfo: name, active, num, objsize, active_slabs, num_slaps, #pages @@ -132,7 +134,7 @@ static void smb_free_request(struct smb_ * What prevents a rget to race with a rput? The count must never drop to zero * while it is in use. Only rput if it is ok that it is free'd. */ -void smb_rget(struct smb_request *req) +static void smb_rget(struct smb_request *req) { atomic_inc(&req->rq_count); } @@ -379,7 +381,7 @@ int smb_add_request(struct smb_request * * Send a request and place it on the recvq if successfully sent. * Must be called with the server lock held. */ -int smb_request_send_req(struct smb_request *req) +static int smb_request_send_req(struct smb_request *req) { struct smb_sb_info *server = req->rq_server; int result; _