lkml.org 
[lkml]   [2017]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] tap: make struct tap_fops static
Date
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
\
 
 \ /
  Last update: 2017-08-12 23:53    [W:0.028 / U:2.700 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site