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>
This commit is contained in:
dingtianhong 2013-08-17 10:27:15 +08:00 коммит произвёл David S. Miller
Родитель ba3542e15c
Коммит df8372ca74
1 изменённых файлов: 14 добавлений и 10 удалений

Просмотреть файл

@ -2501,7 +2501,8 @@ static int inet6_addr_del(struct net *net, int ifindex, const struct in6_addr *p
if (!dev)
return -ENODEV;
if ((idev = __in6_dev_get(dev)) == NULL)
idev = __in6_dev_get(dev);
if (!idev)
return -ENXIO;
read_lock_bh(&idev->lock);
@ -2640,7 +2641,8 @@ static void init_loopback(struct net_device *dev)
ASSERT_RTNL();
if ((idev = ipv6_find_idev(dev)) == NULL) {
idev = ipv6_find_idev(dev);
if (!idev) {
pr_debug("%s: add_dev failed\n", __func__);
return;
}
@ -2738,7 +2740,8 @@ static void addrconf_sit_config(struct net_device *dev)
* our v4 addrs in the tunnel
*/
if ((idev = ipv6_find_idev(dev)) == NULL) {
idev = ipv6_find_idev(dev);
if (!idev) {
pr_debug("%s: add_dev failed\n", __func__);
return;
}
@ -2770,7 +2773,8 @@ static void addrconf_gre_config(struct net_device *dev)
ASSERT_RTNL();
if ((idev = ipv6_find_idev(dev)) == NULL) {
idev = ipv6_find_idev(dev);
if (!idev) {
pr_debug("%s: add_dev failed\n", __func__);
return;
}
@ -2801,11 +2805,11 @@ static void ip6_tnl_add_linklocal(struct inet6_dev *idev)
struct net *net = dev_net(idev->dev);
/* first try to inherit the link-local address from the link device */
if (idev->dev->iflink &&
(link_dev = __dev_get_by_index(net, idev->dev->iflink))) {
if (!ipv6_inherit_linklocal(idev, link_dev))
if (idev->dev->iflink)
link_dev = __dev_get_by_index(net, idev->dev->iflink);
if (link_dev && !ipv6_inherit_linklocal(idev, link_dev))
return;
}
/* then try to inherit it from any device */
for_each_netdev(net, link_dev) {
if (!ipv6_inherit_linklocal(idev, link_dev))