From: <yang.guang5@zte.com.cn>
To: <davem@davemloft.net>
Cc: <jiang.xuexin@zte.com.cn>, <chen.haonan2@zte.com.cn>,
<cgel.zte@gmail.com>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <sd@queasysnail.net>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH linux-next] mlxsw: spectrum: use netif_is_macsec() instead of open code
Date: Fri, 15 Dec 2023 21:45:31 +0800 (CST) [thread overview]
Message-ID: <202312152145312776210@zte.com.cn> (raw)
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
next reply other threads:[~2023-12-15 13:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 13:45 yang.guang5 [this message]
2023-12-15 14:40 ` [PATCH linux-next] mlxsw: spectrum: use netif_is_macsec() instead of open code Ioana Ciornei
2023-12-17 12:42 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202312152145312776210@zte.com.cn \
--to=yang.guang5@zte.com.cn \
--cc=cgel.zte@gmail.com \
--cc=chen.haonan2@zte.com.cn \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiang.xuexin@zte.com.cn \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sd@queasysnail.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).