summaryrefslogtreecommitdiffstats
path: root/net/bridge/br.c
diff options
context:
space:
mode:
authorKyungrok Chung <acadx0@gmail.com>2021-10-16 20:21:36 +0900
committerDavid S. Miller <davem@davemloft.net>2021-10-16 15:02:56 +0100
commit254ec036db1123b10e23e1412c191a3cf70dce71 (patch)
treee86be44703da741c3d4ebaaf2d72bc710d8a637f /net/bridge/br.c
parent4e6e167bc04908c34d11f60cfbf3715eca184536 (diff)
downloadlinux-254ec036db1123b10e23e1412c191a3cf70dce71.tar.gz
linux-254ec036db1123b10e23e1412c191a3cf70dce71.tar.bz2
linux-254ec036db1123b10e23e1412c191a3cf70dce71.zip
net: make use of helper netif_is_bridge_master()
Make use of netdev helper functions to improve code readability. Replace 'dev->priv_flags & IFF_EBRIDGE' with netif_is_bridge_master(dev). Signed-off-by: Kyungrok Chung <acadx0@gmail.com> Reviewed-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br.c')
-rw-r--r--net/bridge/br.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br.c b/net/bridge/br.c
index d3a32c6813e0..1fac72cc617f 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -36,7 +36,7 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v
bool changed_addr;
int err;
- if (dev->priv_flags & IFF_EBRIDGE) {
+ if (netif_is_bridge_master(dev)) {
err = br_vlan_bridge_event(dev, event, ptr);
if (err)
return notifier_from_errno(err);
@@ -349,7 +349,7 @@ static void __net_exit br_net_exit(struct net *net)
rtnl_lock();
for_each_netdev(net, dev)
- if (dev->priv_flags & IFF_EBRIDGE)
+ if (netif_is_bridge_master(dev))
br_dev_delete(dev, &list);
unregister_netdevice_many(&list);