netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lijun Pan <lijunp213@gmail.com>
To: netdev@vger.kernel.org
Cc: Lijun Pan <lijunp213@gmail.com>, Saeed Mahameed <saeedm@nvidia.com>
Subject: [PATCH net-next v2 6/8] ibmvnic: add comments for spinlock_t definitions
Date: Thu, 11 Feb 2021 00:43:23 -0600	[thread overview]
Message-ID: <20210211064325.80591-7-lijunp213@gmail.com> (raw)
In-Reply-To: <20210211064325.80591-1-lijunp213@gmail.com>

There are several spinlock_t definitions without comments.
Add them.

Signed-off-by: Lijun Pan <lijunp213@gmail.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/ibm/ibmvnic.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h
index c09c3f6bba9f..8f73a30a7593 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.h
+++ b/drivers/net/ethernet/ibm/ibmvnic.h
@@ -845,6 +845,7 @@ struct ibmvnic_crq_queue {
 	union ibmvnic_crq *msgs;
 	int size, cur;
 	dma_addr_t msg_token;
+	/* Used for serialization of msgs, cur */
 	spinlock_t lock;
 	bool active;
 	char name[32];
@@ -876,6 +877,7 @@ struct ibmvnic_sub_crq_queue {
 	unsigned int irq;
 	unsigned int pool_index;
 	int scrq_num;
+	/* Used for serialization of msgs, cur */
 	spinlock_t lock;
 	struct sk_buff *rx_skb_top;
 	struct ibmvnic_adapter *adapter;
@@ -1080,9 +1082,12 @@ struct ibmvnic_adapter {
 
 	struct tasklet_struct tasklet;
 	enum vnic_state state;
+	/* Used for serializatin of state field */
+	spinlock_t state_lock;
 	enum ibmvnic_reset_reason reset_reason;
-	spinlock_t rwi_lock;
 	struct list_head rwi_list;
+	/* Used for serialization of rwi_list */
+	spinlock_t rwi_lock;
 	struct work_struct ibmvnic_reset;
 	struct delayed_work ibmvnic_delayed_reset;
 	unsigned long resetting;
@@ -1096,7 +1101,4 @@ struct ibmvnic_adapter {
 
 	struct ibmvnic_tunables desired;
 	struct ibmvnic_tunables fallback;
-
-	/* Used for serializatin of state field */
-	spinlock_t state_lock;
 };
-- 
2.23.0


  parent reply	other threads:[~2021-02-11  6:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11  6:43 [PATCH net-next v2 0/8] a set of fixes of coding style Lijun Pan
2021-02-11  6:43 ` [PATCH net-next v2 1/8] ibmvnic: prefer 'unsigned long' over 'unsigned long int' Lijun Pan
2021-02-11  6:43 ` [PATCH net-next v2 2/8] ibmvnic: fix block comments Lijun Pan
2021-02-11  6:43 ` [PATCH net-next v2 3/8] ibmvnic: fix braces Lijun Pan
2021-02-11  6:43 ` [PATCH net-next v2 4/8] ibmvnic: avoid multiple line dereference Lijun Pan
2021-02-11  6:43 ` [PATCH net-next v2 5/8] ibmvnic: fix miscellaneous checks Lijun Pan
2021-02-11  6:43 ` Lijun Pan [this message]
2021-02-11  6:43 ` [PATCH net-next v2 7/8] ibmvnic: remove unused spinlock_t stats_lock definition Lijun Pan
2021-02-11  6:43 ` [PATCH net-next v2 8/8] ibmvnic: prefer strscpy over strlcpy Lijun Pan
2021-02-11 21:10 ` [PATCH net-next v2 0/8] a set of fixes of coding style 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=20210211064325.80591-7-lijunp213@gmail.com \
    --to=lijunp213@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    /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).