All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juhee Kang <claudiajkang@gmail.com>
To: michael.chan@broadcom.com, davem@davemloft.net, kuba@kernel.org,
	kys@microsoft.com, haiyangz@microsoft.com,
	sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
	netdev@vger.kernel.org
Subject: [PATCH net-next 3/3] mlxsw: spectrum: use netif_is_macsec() instead of open code
Date: Sun, 10 Oct 2021 13:03:29 +0900	[thread overview]
Message-ID: <20211010040329.1078-4-claudiajkang@gmail.com> (raw)
In-Reply-To: <20211010040329.1078-1-claudiajkang@gmail.com>

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>
---
 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 d79163208dfd..9192544fe356 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -5236,7 +5236,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;
-- 
2.25.1


  parent reply	other threads:[~2021-10-10  4:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-10  4:03 [PATCH net-next 0/3] net-next: replace open code with helper functions Juhee Kang
2021-10-10  4:03 ` [PATCH net-next 1/3] bnxt: use netif_is_rxfh_configured instead of open code Juhee Kang
2021-10-10  4:03 ` [PATCH net-next 2/3] hv_netvsc: use netif_is_bond_master() " Juhee Kang
2021-10-10  4:03 ` Juhee Kang [this message]
2021-10-10 10:30 ` [PATCH net-next 0/3] net-next: replace open code with helper functions patchwork-bot+netdevbpf

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=20211010040329.1078-4-claudiajkang@gmail.com \
    --to=claudiajkang@gmail.com \
    --cc=davem@davemloft.net \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kuba@kernel.org \
    --cc=kys@microsoft.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=wei.liu@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.