diff options
author | dingtianhong <dingtianhong@huawei.com> | 2013-08-16 22:27:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-20 18:05:03 -0400 |
commit | df8372ca747f6da9e8590775721d9363c1dfc87e (patch) | |
tree | e86d87b38114b75ab1645f82f849023c1c56f190 /net/ipv6/addrconf.c | |
parent | ba3542e15cf8b9f3dee4c64a383c7102c0d8fab3 (diff) |
ipv6: fix checkpatch errors in net/ipv6/addrconf.c
ERROR: code indent should use tabs where possible: fix 2.
ERROR: do not use assignment in if condition: fix 5.
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 3ca23e89f517..21638d415016 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1110,8 +1110,8 @@ retry: | |||
1110 | spin_unlock_bh(&ifp->lock); | 1110 | spin_unlock_bh(&ifp->lock); |
1111 | 1111 | ||
1112 | regen_advance = idev->cnf.regen_max_retry * | 1112 | regen_advance = idev->cnf.regen_max_retry * |
1113 | idev->cnf.dad_transmits * | 1113 | idev->cnf.dad_transmits * |
1114 | idev->nd_parms->retrans_time / HZ; | 1114 | idev->nd_parms->retrans_time / HZ; |
1115 | write_unlock(&idev->lock); | 1115 | write_unlock(&idev->lock); |
1116 | 1116 | ||
1117 | /* A temporary address is created only if this calculated Preferred | 1117 | /* A temporary address is created only if this calculated Preferred |
@@ -2501,7 +2501,8 @@ static int inet6_addr_del(struct net *net, int ifindex, const struct in6_addr *p | |||
2501 | if (!dev) | 2501 | if (!dev) |
2502 | return -ENODEV; | 2502 | return -ENODEV; |
2503 | 2503 | ||
2504 | if ((idev = __in6_dev_get(dev)) == NULL) | 2504 | idev = __in6_dev_get(dev); |
2505 | if (!idev) | ||
2505 | return -ENXIO; | 2506 | return -ENXIO; |
2506 | 2507 | ||
2507 | read_lock_bh(&idev->lock); | 2508 | read_lock_bh(&idev->lock); |
@@ -2640,7 +2641,8 @@ static void init_loopback(struct net_device *dev) | |||
2640 | 2641 | ||
2641 | ASSERT_RTNL(); | 2642 | ASSERT_RTNL(); |
2642 | 2643 | ||
2643 | if ((idev = ipv6_find_idev(dev)) == NULL) { | 2644 | idev = ipv6_find_idev(dev); |
2645 | if (!idev) { | ||
2644 | pr_debug("%s: add_dev failed\n", __func__); | 2646 | pr_debug("%s: add_dev failed\n", __func__); |
2645 | return; | 2647 | return; |
2646 | } | 2648 | } |
@@ -2738,7 +2740,8 @@ static void addrconf_sit_config(struct net_device *dev) | |||
2738 | * our v4 addrs in the tunnel | 2740 | * our v4 addrs in the tunnel |
2739 | */ | 2741 | */ |
2740 | 2742 | ||
2741 | if ((idev = ipv6_find_idev(dev)) == NULL) { | 2743 | idev = ipv6_find_idev(dev); |
2744 | if (!idev) { | ||
2742 | pr_debug("%s: add_dev failed\n", __func__); | 2745 | pr_debug("%s: add_dev failed\n", __func__); |
2743 | return; | 2746 | return; |
2744 | } | 2747 | } |
@@ -2770,7 +2773,8 @@ static void addrconf_gre_config(struct net_device *dev) | |||
2770 | 2773 | ||
2771 | ASSERT_RTNL(); | 2774 | ASSERT_RTNL(); |
2772 | 2775 | ||
2773 | if ((idev = ipv6_find_idev(dev)) == NULL) { | 2776 | idev = ipv6_find_idev(dev); |
2777 | if (!idev) { | ||
2774 | pr_debug("%s: add_dev failed\n", __func__); | 2778 | pr_debug("%s: add_dev failed\n", __func__); |
2775 | return; | 2779 | return; |
2776 | } | 2780 | } |
@@ -2801,11 +2805,11 @@ static void ip6_tnl_add_linklocal(struct inet6_dev *idev) | |||
2801 | struct net *net = dev_net(idev->dev); | 2805 | struct net *net = dev_net(idev->dev); |
2802 | 2806 | ||
2803 | /* first try to inherit the link-local address from the link device */ | 2807 | /* first try to inherit the link-local address from the link device */ |
2804 | if (idev->dev->iflink && | 2808 | if (idev->dev->iflink) |
2805 | (link_dev = __dev_get_by_index(net, idev->dev->iflink))) { | 2809 | link_dev = __dev_get_by_index(net, idev->dev->iflink); |
2806 | if (!ipv6_inherit_linklocal(idev, link_dev)) | 2810 | if (link_dev && !ipv6_inherit_linklocal(idev, link_dev)) |
2807 | return; | 2811 | return; |
2808 | } | 2812 | |
2809 | /* then try to inherit it from any device */ | 2813 | /* then try to inherit it from any device */ |
2810 | for_each_netdev(net, link_dev) { | 2814 | for_each_netdev(net, link_dev) { |
2811 | if (!ipv6_inherit_linklocal(idev, link_dev)) | 2815 | if (!ipv6_inherit_linklocal(idev, link_dev)) |