summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuhee Kang <claudiajkang@gmail.com>2022-07-21 19:26:48 +0900
committerDavid S. Miller <davem@davemloft.net>2022-07-22 12:35:45 +0100
commitc497885e3044ad92a849cc4433c769f0b66374ab (patch)
treeabc7eab26b746b39c8d443df9b728b94f0937798
parent59ad24714b7bb0c46c69cffc55478cc3295465d3 (diff)
downloadlinux-c497885e3044ad92a849cc4433c769f0b66374ab.tar.gz
linux-c497885e3044ad92a849cc4433c769f0b66374ab.tar.bz2
linux-c497885e3044ad92a849cc4433c769f0b66374ab.zip
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: Juhee Kang <claudiajkang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_router.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_router.c b/drivers/net/ethernet/marvell/prestera/prestera_router.c
index 3c8116f16b4d..58f4e44d5ad7 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_router.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_router.c
@@ -389,8 +389,8 @@ static int __prestera_inetaddr_event(struct prestera_switch *sw,
unsigned long event,
struct netlink_ext_ack *extack)
{
- if (!prestera_netdev_check(dev) || netif_is_bridge_port(dev) ||
- netif_is_lag_port(dev) || netif_is_ovs_port(dev))
+ if (!prestera_netdev_check(dev) || netif_is_any_bridge_port(dev) ||
+ netif_is_lag_port(dev))
return 0;
return __prestera_inetaddr_port_event(dev, event, extack);