Message ID | CAPgLHd-v-daRHrDqoencJOTTvxLU_RD44BWzvdHd6j5Qrr8J5Q@mail.gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
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> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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]);