The following commit has been merged in the merge/master branch: commit 99c22044c68827af1c7467d1620d15947456f325 Merge: ef388433c1de7216a9d55aa9aef2b9ca15c1b913 fbb98aa65dbba86c94808204060434393c2ad19e Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Mar 27 15:09:01 2016 +0800
Merge branch 'next'
diff --combined net/batman-adv/hard-interface.c index 3240a67,c61d5b0..f41b472 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@@ -146,22 -146,22 +146,22 @@@ static bool batadv_is_on_batman_iface(c return ret; }
-static int batadv_is_valid_iface(const struct net_device *net_dev) +static bool batadv_is_valid_iface(const struct net_device *net_dev) { if (net_dev->flags & IFF_LOOPBACK) - return 0; + return false;
if (net_dev->type != ARPHRD_ETHER) - return 0; + return false;
if (net_dev->addr_len != ETH_ALEN) - return 0; + return false;
/* no batman over batman */ if (batadv_is_on_batman_iface(net_dev)) - return 0; + return false;
- return 1; + return true; }
/** @@@ -572,8 -572,7 +572,7 @@@ void batadv_hardif_disable_interface(st struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); struct batadv_hard_iface *primary_if = NULL;
- if (hard_iface->if_status == BATADV_IF_ACTIVE) - batadv_hardif_deactivate_interface(hard_iface); + batadv_hardif_deactivate_interface(hard_iface);
if (hard_iface->if_status != BATADV_IF_INACTIVE) goto out; @@@ -650,7 -649,8 +649,7 @@@ batadv_hardif_add_interface(struct net_
ASSERT_RTNL();
- ret = batadv_is_valid_iface(net_dev); - if (ret != 1) + if (!batadv_is_valid_iface(net_dev)) goto out;
dev_hold(net_dev);