diff mbox series

[-next] vfs: Make _anon_inode_getfile() static

Message ID 20200708152817.13534-1-weiyongjun1@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] vfs: Make _anon_inode_getfile() static | expand

Commit Message

Wei Yongjun July 8, 2020, 3:28 p.m. UTC
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.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 fs/anon_inodes.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
index 25d92c64411e..90b022960027 100644
--- a/fs/anon_inodes.c
+++ b/fs/anon_inodes.c
@@ -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;