* [PATCH net] net: socket: Make unnecessarily global sockfs_setattr() static
@ 2017-01-10 8:30 Tobias Klauser
2017-01-10 8:32 ` Lorenzo Colitti
2017-01-10 16:30 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Tobias Klauser @ 2017-01-10 8:30 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Lorenzo Colitti
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(-)
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);
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: socket: Make unnecessarily global sockfs_setattr() static
2017-01-10 8:30 [PATCH net] net: socket: Make unnecessarily global sockfs_setattr() static Tobias Klauser
@ 2017-01-10 8:32 ` Lorenzo Colitti
2017-01-10 16:30 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Colitti @ 2017-01-10 8:32 UTC (permalink / raw)
To: Tobias Klauser; +Cc: netdev@vger.kernel.org, David S. Miller
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: socket: Make unnecessarily global sockfs_setattr() static
2017-01-10 8:30 [PATCH net] net: socket: Make unnecessarily global sockfs_setattr() static Tobias Klauser
2017-01-10 8:32 ` Lorenzo Colitti
@ 2017-01-10 16:30 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-01-10 16:30 UTC (permalink / raw)
To: tklauser; +Cc: netdev, lorenzo
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-10 16:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 8:30 [PATCH net] net: socket: Make unnecessarily global sockfs_setattr() static Tobias Klauser
2017-01-10 8:32 ` Lorenzo Colitti
2017-01-10 16:30 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).