[PATCH] tuntap: fix sparse warning

Subsystems: networking drivers, the rest, tun/tap driver

STALE4989d

2 messages, 2 authors, 2012-12-18 · open the first message on its own page

[PATCH] tuntap: fix sparse warning

From: Jason Wang <hidden>
Date: 2012-12-18 03:08:41

Make tun_enable_queue() static to fix the sparse warning:

drivers/net/tun.c:399:19: sparse: symbol 'tun_enable_queue' was not declared. Should it be static?

Reported-by: Fengguang Wu <redacted>
Signed-off-by: Jason Wang <redacted>
---
 drivers/net/tun.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 173acf5..504f7f1 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -396,7 +396,7 @@ static void tun_disable_queue(struct tun_struct *tun, struct tun_file *tfile)
 	++tun->numdisabled;
 }
 
-struct tun_struct *tun_enable_queue(struct tun_file *tfile)
+static struct tun_struct *tun_enable_queue(struct tun_file *tfile)
 {
 	struct tun_struct *tun = tfile->detached;
 
-- 
1.7.1

Re: [PATCH] tuntap: fix sparse warning

From: David Miller <davem@davemloft.net>
Date: 2012-12-18 04:49:24

From: Jason Wang <redacted>
Date: Tue, 18 Dec 2012 11:00:27 +0800
Make tun_enable_queue() static to fix the sparse warning:

drivers/net/tun.c:399:19: sparse: symbol 'tun_enable_queue' was not declared. Should it be static?

Reported-by: Fengguang Wu <redacted>
Signed-off-by: Jason Wang <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help