All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juhee Kang <claudiajkang@gmail.com>
To: netdev@vger.kernel.org, simon.horman@corigine.com,
	kuba@kernel.org, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com
Cc: skhan@linuxfoundation.org, Juhee Kang <claudiajkang@gmail.com>
Subject: [PATCH net-next 3/3] nfp: abm: use netdev_unregistering instead of open code
Date: Sat, 24 Sep 2022 01:09:37 +0900	[thread overview]
Message-ID: <20220923160937.1912-3-claudiajkang@gmail.com> (raw)
In-Reply-To: <20220923160937.1912-1-claudiajkang@gmail.com>

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@gmail.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


  parent reply	other threads:[~2022-09-23 16:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 16:09 [PATCH net-next 1/3] net: use netdev_unregistering instead of open code Juhee Kang
2022-09-23 16:09 ` [PATCH net-next 2/3] ethtool: " Juhee Kang
2022-09-26  7:45   ` Simon Horman
2022-09-23 16:09 ` Juhee Kang [this message]
2022-09-26  7:48   ` [PATCH net-next 3/3] nfp: abm: " Simon Horman
2022-09-26  7:44 ` [PATCH net-next 1/3] net: " Simon Horman
2022-09-26  8:05   ` Juhee Kang
2022-09-26  8:19     ` Simon Horman
2022-09-26  8:25       ` Juhee Kang
2022-09-26  8:27         ` Simon Horman
2022-09-26  8:29           ` Juhee Kang
2022-09-26 17:04             ` Jakub Kicinski
2022-09-26 17:45               ` Jakub Kicinski
2022-09-28 14:57                 ` Juhee Kang

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=20220923160937.1912-3-claudiajkang@gmail.com \
    --to=claudiajkang@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=simon.horman@corigine.com \
    --cc=skhan@linuxfoundation.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.