Commit c497885e authored by Juhee Kang's avatar Juhee Kang Committed by David S. Miller

net: marvell: prestera: use netif_is_any_bridge_port instead of open code

The open code which is netif_is_bridge_port() || netif_is_ovs_port() is
defined as a new helper function on netdev.h like netif_is_any_bridge_port
that can check both IFF flags in 1 go. So use netif_is_any_bridge_port()
function instead of open code. This patch doesn't change logic.
Signed-off-by: default avatarJuhee Kang <claudiajkang@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 59ad2471
...@@ -389,8 +389,8 @@ static int __prestera_inetaddr_event(struct prestera_switch *sw, ...@@ -389,8 +389,8 @@ static int __prestera_inetaddr_event(struct prestera_switch *sw,
unsigned long event, unsigned long event,
struct netlink_ext_ack *extack) struct netlink_ext_ack *extack)
{ {
if (!prestera_netdev_check(dev) || netif_is_bridge_port(dev) || if (!prestera_netdev_check(dev) || netif_is_any_bridge_port(dev) ||
netif_is_lag_port(dev) || netif_is_ovs_port(dev)) netif_is_lag_port(dev))
return 0; return 0;
return __prestera_inetaddr_port_event(dev, event, extack); return __prestera_inetaddr_port_event(dev, event, extack);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment