Skip to contentSkip to conversation

fs/read_write.c: make __vfs_write() static

PATCH RESEND In review Eric Biggers 1 participant 2 messages Jan 10, 2019 – Feb 7, 2019 VFS

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 fs/read_write.c: make __vfs_write() static

From: Eric Biggers <[email protected]>

__vfs_write() is only used in fs/read_write.c, so make it static.

This addresses a gcc warning when -Wmissing-prototypes is enabled.

---
 fs/read_write.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/read_write.c +2 -2
index ff3c5e6f87cfa..4b328e45db366 100644
@@ -478,8 +478,8 @@ static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t
 	return ret;
 }
 
-ssize_t __vfs_write(struct file *file, const char __user *p, size_t count,
-		    loff_t *pos)
+static ssize_t __vfs_write(struct file *file, const char __user *p,
+			   size_t count, loff_t *pos)
 {
 	if (file->f_op->write)
 		return file->f_op->write(file, p, count, pos);
Signature · 1 line
2.20.1.97.g81188d93c3-goog
#1 lore raw
Quoted 29 lines · Eric Biggers

From: Eric Biggers <[email protected]>

__vfs_write() is only used in fs/read_write.c, so make it static.

This addresses a gcc warning when -Wmissing-prototypes is enabled.

---
 fs/read_write.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/read_write.c +2 -2
index ff3c5e6f87cfa..4b328e45db366 100644
@@ -478,8 +478,8 @@ static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t
 	return ret;
 }
 
-ssize_t __vfs_write(struct file *file, const char __user *p, size_t count,
-		    loff_t *pos)
+static ssize_t __vfs_write(struct file *file, const char __user *p,
+			   size_t count, loff_t *pos)
 {
 	if (file->f_op->write)
 		return file->f_op->write(file, p, count, pos);
Signature · 1 line
2.20.1.97.g81188d93c3-goog

Ping. Al, are you planning to apply this?

- Eric