From: Ben Dooks Fix warnings from sparse due to un-declared functions that should either have a header file or have been declared static fs/ext2/bitmap.c:14:15: warning: symbol 'ext2_count_free' was not declared. Should it be static? fs/ext2/namei.c:92:15: warning: symbol 'ext2_get_parent' was not declared. Should it be static? fs/ext3/bitmap.c:15:15: warning: symbol 'ext3_count_free' was not declared. Should it be static? fs/ext3/namei.c:1013:15: warning: symbol 'ext3_get_parent' was not declared. Should it be static? fs/ext3/xattr.c:214:1: warning: symbol 'ext3_xattr_block_get' was not declared. Should it be static? fs/ext3/xattr.c:358:1: warning: symbol 'ext3_xattr_block_list' was not declared. Should it be static? fs/ext3/xattr.c:630:1: warning: symbol 'ext3_xattr_block_find' was not declared. Should it be static? fs/ext3/xattr.c:863:1: warning: symbol 'ext3_xattr_ibody_find' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton --- fs/ext3/balloc.c | 2 ++ fs/ext3/bitmap.c | 2 +- fs/ext3/bitmap.h | 8 ++++++++ fs/ext3/ialloc.c | 1 + fs/ext3/namei.c | 2 ++ fs/ext3/namei.h | 8 ++++++++ fs/ext3/xattr.c | 8 ++++---- 7 files changed, 26 insertions(+), 5 deletions(-) diff -puN fs/ext3/balloc.c~ext3-sparse-fixes fs/ext3/balloc.c --- 25/fs/ext3/balloc.c~ext3-sparse-fixes Fri Oct 14 12:22:05 2005 +++ 25-akpm/fs/ext3/balloc.c Fri Oct 14 12:22:05 2005 @@ -20,6 +20,8 @@ #include #include +#include "bitmap.h" + /* * balloc.c contains the blocks allocation and deallocation routines */ diff -puN fs/ext3/bitmap.c~ext3-sparse-fixes fs/ext3/bitmap.c --- 25/fs/ext3/bitmap.c~ext3-sparse-fixes Fri Oct 14 12:22:05 2005 +++ 25-akpm/fs/ext3/bitmap.c Fri Oct 14 12:22:05 2005 @@ -8,7 +8,7 @@ */ #include - +#include "bitmap.h" static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; diff -puN /dev/null fs/ext3/bitmap.h --- /dev/null Thu Apr 11 07:25:15 2002 +++ 25-akpm/fs/ext3/bitmap.h Fri Oct 14 12:22:05 2005 @@ -0,0 +1,8 @@ +/* linux/fs/ext3/bitmap.c + * + * Copyright (C) 2005 Simtec Electronics + * Ben Dooks + * +*/ + +extern unsigned long ext3_count_free (struct buffer_head *, unsigned int ); diff -puN fs/ext3/ialloc.c~ext3-sparse-fixes fs/ext3/ialloc.c --- 25/fs/ext3/ialloc.c~ext3-sparse-fixes Fri Oct 14 12:22:05 2005 +++ 25-akpm/fs/ext3/ialloc.c Fri Oct 14 12:22:05 2005 @@ -26,6 +26,7 @@ #include +#include "bitmap.h" #include "xattr.h" #include "acl.h" diff -puN fs/ext3/namei.c~ext3-sparse-fixes fs/ext3/namei.c --- 25/fs/ext3/namei.c~ext3-sparse-fixes Fri Oct 14 12:22:05 2005 +++ 25-akpm/fs/ext3/namei.c Fri Oct 14 12:22:05 2005 @@ -36,6 +36,8 @@ #include #include #include + +#include "namei.h" #include "xattr.h" #include "acl.h" diff -puN /dev/null fs/ext3/namei.h --- /dev/null Thu Apr 11 07:25:15 2002 +++ 25-akpm/fs/ext3/namei.h Fri Oct 14 12:22:05 2005 @@ -0,0 +1,8 @@ +/* linux/fs/ext3/namei.h + * + * Copyright (C) 2005 Simtec Electronics + * Ben Dooks + * +*/ + +extern struct dentry *ext3_get_parent(struct dentry *child); diff -puN fs/ext3/xattr.c~ext3-sparse-fixes fs/ext3/xattr.c --- 25/fs/ext3/xattr.c~ext3-sparse-fixes Fri Oct 14 12:22:05 2005 +++ 25-akpm/fs/ext3/xattr.c Fri Oct 14 12:22:05 2005 @@ -210,7 +210,7 @@ ext3_xattr_find_entry(struct ext3_xattr_ return cmp ? -ENODATA : 0; } -int +static int ext3_xattr_block_get(struct inode *inode, int name_index, const char *name, void *buffer, size_t buffer_size) { @@ -354,7 +354,7 @@ ext3_xattr_list_entries(struct inode *in return buffer_size - rest; } -int +static int ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size) { struct buffer_head *bh = NULL; @@ -626,7 +626,7 @@ struct ext3_xattr_block_find { struct buffer_head *bh; }; -int +static int ext3_xattr_block_find(struct inode *inode, struct ext3_xattr_info *i, struct ext3_xattr_block_find *bs) { @@ -859,7 +859,7 @@ struct ext3_xattr_ibody_find { struct ext3_iloc iloc; }; -int +static int ext3_xattr_ibody_find(struct inode *inode, struct ext3_xattr_info *i, struct ext3_xattr_ibody_find *is) { _