[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220923160937.1912-3-claudiajkang@gmail.com>
Date: Sat, 24 Sep 2022 01:09:37 +0900
From: Juhee Kang <claudiajkang@...il.com>
To: netdev@...r.kernel.org, simon.horman@...igine.com, kuba@...nel.org,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com
Cc: skhan@...uxfoundation.org, Juhee Kang <claudiajkang@...il.com>
Subject: [PATCH net-next 3/3] nfp: abm: use netdev_unregistering instead of open code
The open code is defined as a helper function(netdev_unregistering)
on netdev.h, which the open code is dev->reg_state == NETREG_UNREGISTERING.
Thus, netdev_unregistering() replaces the open code. This patch doesn't
change logic.
Signed-off-by: Juhee Kang <claudiajkang@...il.com>
---
drivers/net/ethernet/netronome/nfp/abm/qdisc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/netronome/nfp/abm/qdisc.c b/drivers/net/ethernet/netronome/nfp/abm/qdisc.c
index 2a5cc64227e9..19b1ccc9abf6 100644
--- a/drivers/net/ethernet/netronome/nfp/abm/qdisc.c
+++ b/drivers/net/ethernet/netronome/nfp/abm/qdisc.c
@@ -296,7 +296,7 @@ nfp_abm_qdisc_clear_mq(struct net_device *netdev, struct nfp_abm_link *alink,
*/
if (qdisc->type == NFP_QDISC_MQ &&
qdisc == alink->root_qdisc &&
- netdev->reg_state == NETREG_UNREGISTERING)
+ netdev_unregistering(netdev))
return;
/* Count refs held by MQ instances and clear pointers */
--
2.34.1
Powered by blists - more mailing lists