From: YueHaibing <yuehaib...@huawei.com> Fix sparse warnings:
fs/orangefs/super.c:155:5: warning: symbol 'orangefs_write_inode' was not declared. Should it be static? fs/orangefs/inode.c:387:5: warning: symbol 'orangefs_write_begin' was not declared. Should it be static? fs/orangefs/inode.c:445:5: warning: symbol 'orangefs_write_end' was not declared. Should it be static? fs/orangefs/file.c:607:5: warning: symbol 'orangefs_flush' was not declared. Should it be static? Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- fs/orangefs/file.c | 2 +- fs/orangefs/inode.c | 13 ++++++++----- fs/orangefs/super.c | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index a2bbed1..a35c170 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -604,7 +604,7 @@ static int orangefs_file_open(struct inode * inode, struct file *file) return generic_file_open(inode, file); } -int orangefs_flush(struct file *file, fl_owner_t id) +static int orangefs_flush(struct file *file, fl_owner_t id) { /* * This is vfs_fsync_range(file, 0, LLONG_MAX, 0) without the diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index d572e807..46235dd 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -384,9 +384,10 @@ static int orangefs_readpage(struct file *file, struct page *page) return ret; } -int orangefs_write_begin(struct file *file, struct address_space *mapping, - loff_t pos, unsigned len, unsigned flags, struct page **pagep, - void **fsdata) +static int +orangefs_write_begin(struct file *file, struct address_space *mapping, + loff_t pos, unsigned int len, unsigned int flags, + struct page **pagep, void **fsdata) { struct orangefs_write_range *wr; struct page *page; @@ -442,8 +443,10 @@ int orangefs_write_begin(struct file *file, struct address_space *mapping, return 0; } -int orangefs_write_end(struct file *file, struct address_space *mapping, - loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata) +static int +orangefs_write_end(struct file *file, struct address_space *mapping, + loff_t pos, unsigned int len, unsigned int copied, + struct page *page, void *fsdata) { struct inode *inode = page->mapping->host; loff_t last_pos = pos + copied; diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c index 48e0806..8fa30c1 100644 --- a/fs/orangefs/super.c +++ b/fs/orangefs/super.c @@ -152,7 +152,8 @@ static void orangefs_destroy_inode(struct inode *inode) call_rcu(&inode->i_rcu, orangefs_i_callback); } -int orangefs_write_inode(struct inode *inode, struct writeback_control *wbc) +static int orangefs_write_inode(struct inode *inode, + struct writeback_control *wbc) { gossip_debug(GOSSIP_SUPER_DEBUG, "orangefs_write_inode\n"); return orangefs_inode_setattr(inode); -- 2.7.4