netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tuntap: remove unused variable in __tun_detach()
@ 2013-03-13 13:03 Wei Yongjun
  2013-03-13 13:30 ` Neil Horman
  2013-03-13 15:33 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2013-03-13 13:03 UTC (permalink / raw)
  To: davem, jasowang, mst, edumazet, nhorman; +Cc: yongjun_wei, netdev

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

The variable dev is initialized but never used
otherwise, so remove the unused variable.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/tun.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index b7c457a..95837c1 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -409,14 +409,12 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
 {
 	struct tun_file *ntfile;
 	struct tun_struct *tun;
-	struct net_device *dev;
 
 	tun = rtnl_dereference(tfile->tun);
 
 	if (tun && !tfile->detached) {
 		u16 index = tfile->queue_index;
 		BUG_ON(index >= tun->numqueues);
-		dev = tun->dev;
 
 		rcu_assign_pointer(tun->tfiles[index],
 				   tun->tfiles[tun->numqueues - 1]);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tuntap: remove unused variable in __tun_detach()
  2013-03-13 13:03 [PATCH] tuntap: remove unused variable in __tun_detach() Wei Yongjun
@ 2013-03-13 13:30 ` Neil Horman
  2013-03-13 15:33 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Neil Horman @ 2013-03-13 13:30 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: davem, jasowang, mst, edumazet, yongjun_wei, netdev

On Wed, Mar 13, 2013 at 09:03:58PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> The variable dev is initialized but never used
> otherwise, so remove the unused variable.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/net/tun.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index b7c457a..95837c1 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -409,14 +409,12 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
>  {
>  	struct tun_file *ntfile;
>  	struct tun_struct *tun;
> -	struct net_device *dev;
>  
>  	tun = rtnl_dereference(tfile->tun);
>  
>  	if (tun && !tfile->detached) {
>  		u16 index = tfile->queue_index;
>  		BUG_ON(index >= tun->numqueues);
> -		dev = tun->dev;
>  
>  		rcu_assign_pointer(tun->tfiles[index],
>  				   tun->tfiles[tun->numqueues - 1]);
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tuntap: remove unused variable in __tun_detach()
  2013-03-13 13:03 [PATCH] tuntap: remove unused variable in __tun_detach() Wei Yongjun
  2013-03-13 13:30 ` Neil Horman
@ 2013-03-13 15:33 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2013-03-13 15:33 UTC (permalink / raw)
  To: weiyj.lk; +Cc: jasowang, mst, edumazet, nhorman, yongjun_wei, netdev

From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Wed, 13 Mar 2013 21:03:58 +0800

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> The variable dev is initialized but never used
> otherwise, so remove the unused variable.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-13 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 13:03 [PATCH] tuntap: remove unused variable in __tun_detach() Wei Yongjun
2013-03-13 13:30 ` Neil Horman
2013-03-13 15:33 ` 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).