Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1710388 > unrolled thread

[PATCH] tap: make struct tap_fops static

Started byColin King <colin.king@canonical.com>
First post2017-08-13 00:00 +0200
Last post2017-08-14 05:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] tap: make struct tap_fops static Colin King <colin.king@canonical.com> - 2017-08-13 00:00 +0200
    Re: [PATCH] tap: make struct tap_fops static David Miller <davem@davemloft.net> - 2017-08-14 05:20 +0200

#1710388 — [PATCH] tap: make struct tap_fops static

FromColin King <colin.king@canonical.com>
Date2017-08-13 00:00 +0200
Subject[PATCH] tap: make struct tap_fops static
Message-ID<udMBQ-6rM-11@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1710621

FromDavid Miller <davem@davemloft.net>
Date2017-08-14 05:20 +0200
Message-ID<uee54-7hJ-9@gated-at.bofh.it>
In reply to#1710388
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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web