mlxsw: spectrum: use netif_is_macsec() instead of open code
authorJuhee Kang <claudiajkang@gmail.com>
Sun, 10 Oct 2021 04:03:29 +0000 (13:03 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Oct 2021 10:18:48 +0000 (11:18 +0100)
Open code which is dev->priv_flags & IFF_MACSEC has already defined as
netif_is_macsec(). So use netif_is_macsec() 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>
include/linux/netdevice.h

index 15f4a658e4362355d4585915a29207d62f23e271..0723c1314ea25020b8f32a88ddf7bf02a61739ef 100644 (file)
@@ -5237,7 +5237,7 @@ static inline void netif_keep_dst(struct net_device *dev)
 static inline bool netif_reduces_vlan_mtu(struct net_device *dev)
 {
        /* TODO: reserve and use an additional IFF bit, if we get more users */
-       return dev->priv_flags & IFF_MACSEC;
+       return netif_is_macsec(dev);
 }
 
 extern struct pernet_operations __net_initdata loopback_net_ops;