orangefs: Make some functions static
PATCH 1/1 orangefs: Make some functions static
From: YueHaibing <[email protected]>
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 <[email protected]>
--- fs/orangefs/file.c | 2 +- fs/orangefs/inode.c | 13 ++++++++----- fs/orangefs/super.c | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-)
fs/orangefs/file.c +1 -1
@@ -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
fs/orangefs/inode.c +8 -5
@@ -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;
fs/orangefs/super.c +2 -1
@@ -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);
Signature · 1 line
2.7.4