aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-01-21 20:28:59 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:10:18 -0500
commitba93ef746560df597b19bbcee04ce7ed70ebc700 (patch)
treeb90733dc6505ae3653773764836069ae226e064c /net
parentdd329bfa96dd9dabfc3b5154317bf5fbe9440455 (diff)
[IPV4]: ipmr sparse warnings
Get rid of some of the sparse warnings. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ipmr.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 772daf77878f..4198615ca678 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -141,7 +141,7 @@ struct net_device *ipmr_new_tunnel(struct vifctl *v)
141 p.iph.ihl = 5; 141 p.iph.ihl = 5;
142 p.iph.protocol = IPPROTO_IPIP; 142 p.iph.protocol = IPPROTO_IPIP;
143 sprintf(p.name, "dvmrp%d", v->vifc_vifi); 143 sprintf(p.name, "dvmrp%d", v->vifc_vifi);
144 ifr.ifr_ifru.ifru_data = (void*)&p; 144 ifr.ifr_ifru.ifru_data = (__force void __user *)&p;
145 145
146 oldfs = get_fs(); set_fs(KERNEL_DS); 146 oldfs = get_fs(); set_fs(KERNEL_DS);
147 err = dev->do_ioctl(dev, &ifr, SIOCADDTUNNEL); 147 err = dev->do_ioctl(dev, &ifr, SIOCADDTUNNEL);
@@ -954,10 +954,12 @@ int ip_mroute_setsockopt(struct sock *sk,int optname,char __user *optval,int opt
954#ifdef CONFIG_IP_PIMSM 954#ifdef CONFIG_IP_PIMSM
955 case MRT_PIM: 955 case MRT_PIM:
956 { 956 {
957 int v, ret; 957 int v;
958
958 if (get_user(v,(int __user *)optval)) 959 if (get_user(v,(int __user *)optval))
959 return -EFAULT; 960 return -EFAULT;
960 v = (v)?1:0; 961 v = (v) ? 1 : 0;
962
961 rtnl_lock(); 963 rtnl_lock();
962 ret = 0; 964 ret = 0;
963 if (v != mroute_do_pim) { 965 if (v != mroute_do_pim) {
@@ -1659,6 +1661,7 @@ static struct vif_device *ipmr_vif_seq_idx(struct ipmr_vif_iter *iter,
1659} 1661}
1660 1662
1661static void *ipmr_vif_seq_start(struct seq_file *seq, loff_t *pos) 1663static void *ipmr_vif_seq_start(struct seq_file *seq, loff_t *pos)
1664 __acquires(mrt_lock)
1662{ 1665{
1663 read_lock(&mrt_lock); 1666 read_lock(&mrt_lock);
1664 return *pos ? ipmr_vif_seq_idx(seq->private, *pos - 1) 1667 return *pos ? ipmr_vif_seq_idx(seq->private, *pos - 1)
@@ -1682,6 +1685,7 @@ static void *ipmr_vif_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1682} 1685}
1683 1686
1684static void ipmr_vif_seq_stop(struct seq_file *seq, void *v) 1687static void ipmr_vif_seq_stop(struct seq_file *seq, void *v)
1688 __releases(mrt_lock)
1685{ 1689{
1686 read_unlock(&mrt_lock); 1690 read_unlock(&mrt_lock);
1687} 1691}