Skip to contentSkip to conversation

net: socket: Make unnecessarily global sockfs_setattr() static

PATCH Applied Tobias Klauser 3 participants 3 messages Jan 10, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: socket: Make unnecessarily global sockfs_setattr() static

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 <[email protected]>
---
 net/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/socket.c +1 -1
index 009dd12ab7f3..727dfd96da07 100644
@@ -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);
 
Signature · 1 line
2.11.0
Acked-by on v1 1/1
#1 lore raw

net/socket.c static ssize_t sockfs_listxattr(struct dentry *dentry, char *buffer, · line 534

Quoted 2 lines · Tobias Klauser
net/socket.c +1 -1
-int sockfs_setattr(struct dentry *dentry, struct iattr *iattr)
+static int sockfs_setattr(struct dentry *dentry, struct iattr *iattr)
maintainer Applied
#2 lore raw
In reply to Tobias Klauser

From: Tobias Klauser <[email protected]>
Date: Tue, 10 Jan 2017 09:30:51 +0100

Quoted 8 lines

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 <[email protected]>

Applied, thanks.