diff mbox

[net] net: socket: Make unnecessarily global sockfs_setattr() static

Message ID 20170110083051.753-1-tklauser@distanz.ch
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Tobias Klauser Jan. 10, 2017, 8:30 a.m. UTC
Make sockfs_setattr() static as it is not used outside of net/socket.c

This fixes the following GCC warning:
net/socket.c:534:5: warning: no previous prototype for ‘sockfs_setattr’ [-Wmissing-prototypes]

Fixes: 86741ec25462 ("net: core: Add a UID field to struct sock.")
Cc: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 net/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lorenzo Colitti Jan. 10, 2017, 8:32 a.m. UTC | #1
On Tue, Jan 10, 2017 at 5:30 PM, Tobias Klauser <tklauser@distanz.ch> wrote:
> -int sockfs_setattr(struct dentry *dentry, struct iattr *iattr)
> +static int sockfs_setattr(struct dentry *dentry, struct iattr *iattr)

Acked-by: Lorenzo Colitti <lorenzo@google.com>
David Miller Jan. 10, 2017, 4:30 p.m. UTC | #2
From: Tobias Klauser <tklauser@distanz.ch>

Date: Tue, 10 Jan 2017 09:30:51 +0100

> Make sockfs_setattr() static as it is not used outside of net/socket.c

> 

> This fixes the following GCC warning:

> net/socket.c:534:5: warning: no previous prototype for ‘sockfs_setattr’ [-Wmissing-prototypes]

> 

> Fixes: 86741ec25462 ("net: core: Add a UID field to struct sock.")

> Cc: Lorenzo Colitti <lorenzo@google.com>

> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>


Applied, thanks.
diff mbox

Patch

diff --git a/net/socket.c b/net/socket.c
index 009dd12ab7f3..727dfd96da07 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -531,7 +531,7 @@  static ssize_t sockfs_listxattr(struct dentry *dentry, char *buffer,
 	return used;
 }
 
-int sockfs_setattr(struct dentry *dentry, struct iattr *iattr)
+static int sockfs_setattr(struct dentry *dentry, struct iattr *iattr)
 {
 	int err = simple_setattr(dentry, iattr);