[PATCH 05/14] PMFS: Fix up static / inline errors

Matthew Wilcox matthew.r.wilcox at intel.com
Mon Oct 7 09:36:54 EDT 2013


From: Matthew Wilcox <willy at linux.intel.com>

All flagged by sparse.

Signed-off-by: Matthew Wilcox <matthew.r.wilcox at intel.com>
---
 fs/pmfs/file.c     |  6 +++---
 fs/pmfs/journal.h  |  6 +++---
 fs/pmfs/pmfs.h     | 12 ++++--------
 fs/pmfs/super.c    |  2 +-
 fs/pmfs/wprotect.c |  2 +-
 fs/pmfs/xip.c      |  8 ++++----
 6 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/fs/pmfs/file.c b/fs/pmfs/file.c
index 54c4724..36bdc1d 100644
--- a/fs/pmfs/file.c
+++ b/fs/pmfs/file.c
@@ -138,7 +138,7 @@ out:
 	return ret;
 }
 
-loff_t pmfs_llseek(struct file *file, loff_t offset, int origin)
+static loff_t pmfs_llseek(struct file *file, loff_t offset, int origin)
 {
 	struct inode *inode = file->f_path.dentry->d_inode;
 	int retval;
@@ -183,7 +183,7 @@ loff_t pmfs_llseek(struct file *file, loff_t offset, int origin)
  * TODO: Check if we can avoid calling pmfs_flush_buffer() for fsync. We use
  * movnti to write data to files, so we may want to avoid doing unnecessary
  * pmfs_flush_buffer() on fsync() */
-int pmfs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
+static int pmfs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
 {
 	/* Sync from start to end[inclusive] */
 	struct address_space *mapping = file->f_mapping;
@@ -262,7 +262,7 @@ extern unsigned long arch_get_unmapped_area_sz(struct file *file,
 	unsigned long addr0, unsigned long len, unsigned long align_size,
 	unsigned long pgoff, unsigned long flags);
 
-unsigned long
+static unsigned long
 pmfs_get_unmapped_area(struct file *file, unsigned long addr,
 			unsigned long len, unsigned long pgoff,
 			unsigned long flags)
diff --git a/fs/pmfs/journal.h b/fs/pmfs/journal.h
index 6781029..d36af88 100644
--- a/fs/pmfs/journal.h
+++ b/fs/pmfs/journal.h
@@ -80,8 +80,8 @@ typedef struct pmfs_transaction {
 	struct pmfs_transaction *parent;
 } pmfs_transaction_t;
 
-extern inline pmfs_transaction_t *pmfs_alloc_transaction(void);
-extern inline void pmfs_free_transaction(pmfs_transaction_t *trans);
+extern pmfs_transaction_t *pmfs_alloc_transaction(void);
+extern void pmfs_free_transaction(pmfs_transaction_t *trans);
 
 extern int pmfs_journal_soft_init(struct super_block *sb);
 extern int pmfs_journal_hard_init(struct super_block *sb,
@@ -89,7 +89,7 @@ extern int pmfs_journal_hard_init(struct super_block *sb,
 extern int pmfs_journal_uninit(struct super_block *sb);
 extern pmfs_transaction_t *pmfs_new_transaction(struct super_block *sb,
 		int nclines);
-extern inline pmfs_transaction_t *pmfs_current_transaction(void);
+extern pmfs_transaction_t *pmfs_current_transaction(void);
 extern int pmfs_add_logentry(struct super_block *sb,
 		pmfs_transaction_t *trans, void *addr, uint16_t size, u8 type);
 extern int pmfs_commit_transaction(struct super_block *sb,
diff --git a/fs/pmfs/pmfs.h b/fs/pmfs/pmfs.h
index 1a79c34..0031be8 100644
--- a/fs/pmfs/pmfs.h
+++ b/fs/pmfs/pmfs.h
@@ -152,14 +152,10 @@ extern void pmfs_put_inode(struct inode *inode);
 extern void pmfs_evict_inode(struct inode *inode);
 extern struct inode *pmfs_new_inode(pmfs_transaction_t *trans,
 	struct inode *dir, umode_t mode, const struct qstr *qstr);
-extern inline void pmfs_update_isize(struct inode *inode,
-		struct pmfs_inode *pi);
-extern inline void pmfs_update_nlink(struct inode *inode,
-		struct pmfs_inode *pi);
-extern inline void pmfs_update_time(struct inode *inode,
-		struct pmfs_inode *pi);
-extern int pmfs_write_inode(struct inode *inode,
-	struct writeback_control *wbc);
+extern void pmfs_update_isize(struct inode *inode, struct pmfs_inode *pi);
+extern void pmfs_update_nlink(struct inode *inode, struct pmfs_inode *pi);
+extern void pmfs_update_time(struct inode *inode, struct pmfs_inode *pi);
+extern int pmfs_write_inode(struct inode *inode, struct writeback_control *wbc);
 extern void pmfs_dirty_inode(struct inode *inode, int flags);
 extern int pmfs_notify_change(struct dentry *dentry, struct iattr *attr);
 int pmfs_getattr(struct vfsmount *mnt, struct dentry *dentry, 
diff --git a/fs/pmfs/super.c b/fs/pmfs/super.c
index 19f3b8e0..83c0464 100644
--- a/fs/pmfs/super.c
+++ b/fs/pmfs/super.c
@@ -930,7 +930,7 @@ restore_opt:
 	return ret;
 }
 
-void pmfs_put_super(struct super_block *sb)
+static void pmfs_put_super(struct super_block *sb)
 {
 	struct pmfs_sb_info *sbi = PMFS_SB(sb);
 	struct pmfs_super_block *ps = pmfs_get_super(sb);
diff --git a/fs/pmfs/wprotect.c b/fs/pmfs/wprotect.c
index 544e6cf..c923509 100644
--- a/fs/pmfs/wprotect.c
+++ b/fs/pmfs/wprotect.c
@@ -40,7 +40,7 @@ static inline void wprotect_enable(void)
 }
 
 /* FIXME: Use PAGE RW Bit */
-int pmfs_writeable_old(void *vaddr, unsigned long size, int rw)
+static int pmfs_writeable_old(void *vaddr, unsigned long size, int rw)
 {
 	int ret = 0;
 	unsigned long nrpages = size >> PAGE_SHIFT;
diff --git a/fs/pmfs/xip.c b/fs/pmfs/xip.c
index 504dd3d..6aedb4c 100644
--- a/fs/pmfs/xip.c
+++ b/fs/pmfs/xip.c
@@ -331,8 +331,7 @@ static int __pmfs_xip_file_fault(struct vm_area_struct *vma,
 	return VM_FAULT_NOPAGE;
 }
 
-extern int
-pmfs_xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+static int pmfs_xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
 	int ret = 0;
 
@@ -446,7 +445,7 @@ int pmfs_get_xip_mem(struct address_space *mapping, pgoff_t pgoff, int create,
 	return 0;
 }
 
-unsigned long pmfs_data_block_size(struct vm_area_struct *vma,
+static unsigned long pmfs_data_block_size(struct vm_area_struct *vma,
 				    unsigned long addr, unsigned long pgoff)
 {
 	struct file *file = vma->vm_file;
@@ -611,7 +610,8 @@ out_mutex:
 	return ret;
 }
 
-int pmfs_xip_file_hpage_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+static int pmfs_xip_file_hpage_fault(struct vm_area_struct *vma,
+							struct vm_fault *vmf)
 {
 	int ret = 0;
 
-- 
1.8.4.rc3




More information about the Linux-pmfs mailing list