* [PATCH] tap: make struct tap_fops static
@ 2017-08-12 21:52 Colin King
2017-08-14 3:11 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-08-12 21:52 UTC (permalink / raw)
To: David S . Miller, Sainath Grandhi, Jason Wang, Rolf Neugebauer,
Willem de Bruijn, Zhang Shengju, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The structure tap_fops is local to the source and does not need to
be in global scope, so make it static.
Cleans up sparse warning:
symbol 'tap_fops' was not declared. Should it be static?
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/tap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tap.c b/drivers/net/tap.c
index ca267fd28ab8..0d039411e64c 100644
--- a/drivers/net/tap.c
+++ b/drivers/net/tap.c
@@ -1127,7 +1127,7 @@ static long tap_compat_ioctl(struct file *file, unsigned int cmd,
}
#endif
-const struct file_operations tap_fops = {
+static const struct file_operations tap_fops = {
.owner = THIS_MODULE,
.open = tap_open,
.release = tap_release,
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tap: make struct tap_fops static
2017-08-12 21:52 [PATCH] tap: make struct tap_fops static Colin King
@ 2017-08-14 3:11 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-08-14 3:11 UTC (permalink / raw)
To: colin.king
Cc: sainath.grandhi, jasowang, rolf.neugebauer, willemb, zhangshengju,
netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Sat, 12 Aug 2017 22:52:31 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> The structure tap_fops is local to the source and does not need to
> be in global scope, so make it static.
>
> Cleans up sparse warning:
> symbol 'tap_fops' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-14 3:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-12 21:52 [PATCH] tap: make struct tap_fops static Colin King
2017-08-14 3:11 ` 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).