Skip to contentSkip to conversation

vfs: Make _anon_inode_getfile() static

PATCH New Wei Yongjun 1 participant 1 message Jul 8, 2020 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfs: Make _anon_inode_getfile() static

The sparse tool complains as follows:

fs/anon_inodes.c:80:13: warning:
symbol '_anon_inode_getfile' was not declared. Should it be static?

_anon_inode_getfile() is not used outside of anon_inodes.c, so marks it static.

---
 fs/anon_inodes.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
fs/anon_inodes.c +5 -5
index 25d92c64411e..90b022960027 100644
@@ -77,11 +77,11 @@ static struct inode *anon_inode_make_secure_inode(
 	return inode;
 }
 
-struct file *_anon_inode_getfile(const char *name,
-				 const struct file_operations *fops,
-				 void *priv, int flags,
-				 const struct inode *context_inode,
-				 bool secure)
+static struct file *_anon_inode_getfile(const char *name,
+					const struct file_operations *fops,
+					void *priv, int flags,
+					const struct inode *context_inode,
+					bool secure)
 {
 	struct inode *inode;
 	struct file *file;