hv_netvsc: use netif_is_bond_master() instead of open code

[ Upstream commit c60882a456 ]

Use netif_is_bond_master() function instead of open code, which is
((event_dev->priv_flags & IFF_BONDING) && (event_dev->flags & IFF_MASTER)).
This patch doesn't change logic.

Signed-off-by: Juhee Kang <claudiajkang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 9cae43da9867 ("hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Juhee Kang 2021-10-10 13:03:28 +09:00 коммит произвёл Sasha Levin
Родитель 760d0df3ad
Коммит c4cfa93e50
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -2784,8 +2784,7 @@ static int netvsc_netdev_event(struct notifier_block *this,
return NOTIFY_DONE;
/* Avoid Bonding master dev with same MAC registering as VF */
if ((event_dev->priv_flags & IFF_BONDING) &&
(event_dev->flags & IFF_MASTER))
if (netif_is_bond_master(event_dev))
return NOTIFY_DONE;
switch (event) {