netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] mlxsw: spectrum: use netif_is_macsec() instead of open code
@ 2023-12-15 13:45 yang.guang5
  2023-12-15 14:40 ` Ioana Ciornei
  2023-12-17 12:42 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: yang.guang5 @ 2023-12-15 13:45 UTC (permalink / raw)
  To: davem
  Cc: jiang.xuexin, chen.haonan2, cgel.zte, edumazet, kuba, pabeni, sd,
	netdev, linux-kernel

From: Yang Guang <yang.guang5@zte.com.cn>

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.
No functional changed.

Signed-off-by: Chen Haonan <chen.haonan2@zte.com.cn>
---
 include/linux/netdevice.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1b935ee341b4..1f2b23d854c9 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -5103,7 +5103,7 @@ void netif_inherit_tso_max(struct net_device *to,

 static inline bool netif_is_macsec(const struct net_device *dev)
 {
-	return dev->priv_flags & IFF_MACSEC;
+	return netif_is_macsec(dev);
 }

 static inline bool netif_is_macvlan(const struct net_device *dev)
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-17 12:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15 13:45 [PATCH linux-next] mlxsw: spectrum: use netif_is_macsec() instead of open code yang.guang5
2023-12-15 14:40 ` Ioana Ciornei
2023-12-17 12:42 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).