netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/7] a set of fixes of coding style
@ 2021-01-12  6:42 Lijun Pan
  2021-01-12  6:42 ` [PATCH net-next 1/7] ibmvnic: prefer 'unsigned long' over 'unsigned long int' Lijun Pan
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Lijun Pan @ 2021-01-12  6:42 UTC (permalink / raw)
  To: netdev; +Cc: Lijun Pan

This series address several coding style problems.

Lijun Pan (7):
  ibmvnic: prefer 'unsigned long' over 'unsigned long int'
  ibmvnic: fix block comments
  ibmvnic: fix braces
  ibmvnic: avoid multiple line dereference
  ibmvnic: fix miscellaneous checks
  ibmvnic: add comments for spinlock_t definitions
  ibmvnic: remove unused spinlock_t stats_lock definition

 drivers/net/ethernet/ibm/ibmvnic.c | 65 +++++++++++++-----------------
 drivers/net/ethernet/ibm/ibmvnic.h | 11 ++---
 2 files changed, 35 insertions(+), 41 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH net-next 1/7] ibmvnic: prefer 'unsigned long' over 'unsigned long int'
  2021-01-12  6:42 [PATCH net-next 0/7] a set of fixes of coding style Lijun Pan
@ 2021-01-12  6:42 ` Lijun Pan
  2021-01-12  6:43 ` [PATCH net-next 2/7] ibmvnic: fix block comments Lijun Pan
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Lijun Pan @ 2021-01-12  6:42 UTC (permalink / raw)
  To: netdev; +Cc: Lijun Pan

Fix the following checkpatch warnings:
WARNING: Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary
WARNING: Prefer 'long' over 'long int' as the int is unnecessary

Signed-off-by: Lijun Pan <lijunp213@gmail.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index f6d3b20a5361..d4ba5f5a2b08 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -3666,8 +3666,8 @@ static int ibmvnic_send_crq(struct ibmvnic_adapter *adapter,
 	int rc;
 
 	netdev_dbg(adapter->netdev, "Sending CRQ: %016lx %016lx\n",
-		   (unsigned long int)cpu_to_be64(u64_crq[0]),
-		   (unsigned long int)cpu_to_be64(u64_crq[1]));
+		   (unsigned long)cpu_to_be64(u64_crq[0]),
+		   (unsigned long)cpu_to_be64(u64_crq[1]));
 
 	if (!adapter->crq.active &&
 	    crq->generic.first != IBMVNIC_CRQ_INIT_CMD) {
@@ -3894,7 +3894,7 @@ static int send_login(struct ibmvnic_adapter *adapter)
 	netdev_dbg(adapter->netdev, "Login Buffer:\n");
 	for (i = 0; i < (adapter->login_buf_sz - 1) / 8 + 1; i++) {
 		netdev_dbg(adapter->netdev, "%016lx\n",
-			   ((unsigned long int *)(adapter->login_buf))[i]);
+			   ((unsigned long *)(adapter->login_buf))[i]);
 	}
 
 	memset(&crq, 0, sizeof(crq));
@@ -4262,7 +4262,7 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter)
 	netdev_dbg(adapter->netdev, "Query IP Offload Buffer:\n");
 	for (i = 0; i < (sizeof(adapter->ip_offload_buf) - 1) / 8 + 1; i++)
 		netdev_dbg(adapter->netdev, "%016lx\n",
-			   ((unsigned long int *)(buf))[i]);
+			   ((unsigned long *)(buf))[i]);
 
 	netdev_dbg(adapter->netdev, "ipv4_chksum = %d\n", buf->ipv4_chksum);
 	netdev_dbg(adapter->netdev, "ipv6_chksum = %d\n", buf->ipv6_chksum);
@@ -4421,7 +4421,7 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq,
 	case PARTIALSUCCESS:
 		dev_info(dev, "req=%lld, rsp=%ld in %s queue, retrying.\n",
 			 *req_value,
-			 (long int)be64_to_cpu(crq->request_capability_rsp.
+			 (long)be64_to_cpu(crq->request_capability_rsp.
 					       number), name);
 
 		if (be16_to_cpu(crq->request_capability_rsp.capability) ==
@@ -4492,7 +4492,7 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,
 	netdev_dbg(adapter->netdev, "Login Response Buffer:\n");
 	for (i = 0; i < (adapter->login_rsp_buf_sz - 1) / 8 + 1; i++) {
 		netdev_dbg(adapter->netdev, "%016lx\n",
-			   ((unsigned long int *)(adapter->login_rsp_buf))[i]);
+			   ((unsigned long *)(adapter->login_rsp_buf))[i]);
 	}
 
 	/* Sanity checks */
@@ -4835,8 +4835,8 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,
 	long rc;
 
 	netdev_dbg(netdev, "Handling CRQ: %016lx %016lx\n",
-		   (unsigned long int)cpu_to_be64(u64_crq[0]),
-		   (unsigned long int)cpu_to_be64(u64_crq[1]));
+		   (unsigned long)cpu_to_be64(u64_crq[0]),
+		   (unsigned long)cpu_to_be64(u64_crq[1]));
 	switch (gen_crq->first) {
 	case IBMVNIC_CRQ_INIT_RSP:
 		switch (gen_crq->cmd) {
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net-next 2/7] ibmvnic: fix block comments
  2021-01-12  6:42 [PATCH net-next 0/7] a set of fixes of coding style Lijun Pan
  2021-01-12  6:42 ` [PATCH net-next 1/7] ibmvnic: prefer 'unsigned long' over 'unsigned long int' Lijun Pan
@ 2021-01-12  6:43 ` Lijun Pan
  2021-01-12  6:43 ` [PATCH net-next 3/7] ibmvnic: fix braces Lijun Pan
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Lijun Pan @ 2021-01-12  6:43 UTC (permalink / raw)
  To: netdev; +Cc: Lijun Pan

Fix the following checkpatch warning:
WARNING: networking block comments don't use an empty /* line, use /* Comment...

Signed-off-by: Lijun Pan <lijunp213@gmail.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index d4ba5f5a2b08..fe08c5415b9e 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1220,8 +1220,7 @@ static int ibmvnic_open(struct net_device *netdev)
 	rc = __ibmvnic_open(netdev);
 
 out:
-	/*
-	 * If open fails due to a pending failover, set device state and
+	/* If open fails due to a pending failover, set device state and
 	 * return. Device operation will be handled by reset routine.
 	 */
 	if (rc && adapter->failover_pending) {
@@ -1946,8 +1945,7 @@ static int do_reset(struct ibmvnic_adapter *adapter,
 	if (!(adapter->reset_reason == VNIC_RESET_CHANGE_PARAM))
 		rtnl_lock();
 
-	/*
-	 * Now that we have the rtnl lock, clear any pending failover.
+	/* Now that we have the rtnl lock, clear any pending failover.
 	 * This will ensure ibmvnic_open() has either completed or will
 	 * block until failover is complete.
 	 */
@@ -2249,8 +2247,7 @@ static void __ibmvnic_reset(struct work_struct *work)
 		spin_unlock_irqrestore(&adapter->state_lock, flags);
 
 		if (adapter->force_reset_recovery) {
-			/*
-			 * Since we are doing a hard reset now, clear the
+			/* Since we are doing a hard reset now, clear the
 			 * failover_pending flag so we don't ignore any
 			 * future MOBILITY or other resets.
 			 */
@@ -2323,8 +2320,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
 	unsigned long flags;
 	int ret;
 
-	/*
-	 * If failover is pending don't schedule any other reset.
+	/* If failover is pending don't schedule any other reset.
 	 * Instead let the failover complete. If there is already a
 	 * a failover reset scheduled, we will detect and drop the
 	 * duplicate reset when walking the ->rwi_list below.
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net-next 3/7] ibmvnic: fix braces
  2021-01-12  6:42 [PATCH net-next 0/7] a set of fixes of coding style Lijun Pan
  2021-01-12  6:42 ` [PATCH net-next 1/7] ibmvnic: prefer 'unsigned long' over 'unsigned long int' Lijun Pan
  2021-01-12  6:43 ` [PATCH net-next 2/7] ibmvnic: fix block comments Lijun Pan
@ 2021-01-12  6:43 ` Lijun Pan
  2021-01-12  6:43 ` [PATCH net-next 4/7] ibmvnic: avoid multiple line dereference Lijun Pan
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Lijun Pan @ 2021-01-12  6:43 UTC (permalink / raw)
  To: netdev; +Cc: Lijun Pan

Fix the following checkpatch warning:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Lijun Pan <lijunp213@gmail.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index fe08c5415b9e..eb3ab0e6156f 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2040,9 +2040,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
 		}
 
 		rc = ibmvnic_login(netdev);
-		if (rc) {
+		if (rc)
 			goto out;
-		}
 
 		if (adapter->reset_reason == VNIC_RESET_CHANGE_PARAM) {
 			rc = init_resources(adapter);
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net-next 4/7] ibmvnic: avoid multiple line dereference
  2021-01-12  6:42 [PATCH net-next 0/7] a set of fixes of coding style Lijun Pan
                   ` (2 preceding siblings ...)
  2021-01-12  6:43 ` [PATCH net-next 3/7] ibmvnic: fix braces Lijun Pan
@ 2021-01-12  6:43 ` Lijun Pan
  2021-01-12  6:43 ` [PATCH net-next 5/7] ibmvnic: fix miscellaneous checks Lijun Pan
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Lijun Pan @ 2021-01-12  6:43 UTC (permalink / raw)
  To: netdev; +Cc: Lijun Pan

Fix the following checkpatch warning:
WARNING: Avoid multiple line dereference

Signed-off-by: Lijun Pan <lijunp213@gmail.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index eb3ab0e6156f..30add8a8a3dc 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2447,9 +2447,8 @@ static int ibmvnic_poll(struct napi_struct *napi, int budget)
 		 */
 		dma_rmb();
 		next = ibmvnic_next_scrq(adapter, rx_scrq);
-		rx_buff =
-		    (struct ibmvnic_rx_buff *)be64_to_cpu(next->
-							  rx_comp.correlator);
+		rx_buff = (struct ibmvnic_rx_buff *)
+			  be64_to_cpu(next->rx_comp.correlator);
 		/* do error checking */
 		if (next->rx_comp.rc) {
 			netdev_dbg(netdev, "rx buffer returned with rc %x\n",
@@ -3865,15 +3864,15 @@ static int send_login(struct ibmvnic_adapter *adapter)
 
 	for (i = 0; i < adapter->req_tx_queues; i++) {
 		if (adapter->tx_scrq[i]) {
-			tx_list_p[i] = cpu_to_be64(adapter->tx_scrq[i]->
-						   crq_num);
+			tx_list_p[i] =
+				cpu_to_be64(adapter->tx_scrq[i]->crq_num);
 		}
 	}
 
 	for (i = 0; i < adapter->req_rx_queues; i++) {
 		if (adapter->rx_scrq[i]) {
-			rx_list_p[i] = cpu_to_be64(adapter->rx_scrq[i]->
-						   crq_num);
+			rx_list_p[i] =
+				cpu_to_be64(adapter->rx_scrq[i]->crq_num);
 		}
 	}
 
@@ -4416,8 +4415,8 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq,
 	case PARTIALSUCCESS:
 		dev_info(dev, "req=%lld, rsp=%ld in %s queue, retrying.\n",
 			 *req_value,
-			 (long)be64_to_cpu(crq->request_capability_rsp.
-					       number), name);
+			 (long)be64_to_cpu(crq->request_capability_rsp.number),
+			 name);
 
 		if (be16_to_cpu(crq->request_capability_rsp.capability) ==
 		    REQ_MTU) {
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net-next 5/7] ibmvnic: fix miscellaneous checks
  2021-01-12  6:42 [PATCH net-next 0/7] a set of fixes of coding style Lijun Pan
                   ` (3 preceding siblings ...)
  2021-01-12  6:43 ` [PATCH net-next 4/7] ibmvnic: avoid multiple line dereference Lijun Pan
@ 2021-01-12  6:43 ` Lijun Pan
  2021-01-12  6:43 ` [PATCH net-next 6/7] ibmvnic: add comments for spinlock_t definitions Lijun Pan
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Lijun Pan @ 2021-01-12  6:43 UTC (permalink / raw)
  To: netdev; +Cc: Lijun Pan

Fix the following checkpatch checks:
CHECK: Macro argument 'off' may be better as '(off)' to
avoid precedence issues
CHECK: Alignment should match open parenthesis
CHECK: multiple assignments should be avoided
CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: Please use a blank line after function/struct/union/enum
declarations
CHECK: Unnecessary parentheses around 'rc != H_FUNCTION'

Signed-off-by: Lijun Pan <lijunp213@gmail.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 30add8a8a3dc..f9db139f652b 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -115,7 +115,7 @@ struct ibmvnic_stat {
 
 #define IBMVNIC_STAT_OFF(stat) (offsetof(struct ibmvnic_adapter, stats) + \
 			     offsetof(struct ibmvnic_statistics, stat))
-#define IBMVNIC_GET_STAT(a, off) (*((u64 *)(((unsigned long)(a)) + off)))
+#define IBMVNIC_GET_STAT(a, off) (*((u64 *)(((unsigned long)(a)) + (off))))
 
 static const struct ibmvnic_stat ibmvnic_stats[] = {
 	{"rx_packets", IBMVNIC_STAT_OFF(rx_packets)},
@@ -2069,14 +2069,14 @@ static int do_reset(struct ibmvnic_adapter *adapter,
 			rc = reset_tx_pools(adapter);
 			if (rc) {
 				netdev_dbg(adapter->netdev, "reset tx pools failed (%d)\n",
-						rc);
+					   rc);
 				goto out;
 			}
 
 			rc = reset_rx_pools(adapter);
 			if (rc) {
 				netdev_dbg(adapter->netdev, "reset rx pools failed (%d)\n",
-						rc);
+					   rc);
 				goto out;
 			}
 		}
@@ -2334,7 +2334,8 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
 
 	if (adapter->state == VNIC_PROBING) {
 		netdev_warn(netdev, "Adapter reset during probe\n");
-		ret = adapter->init_done_rc = EAGAIN;
+		adapter->init_done_rc = EAGAIN;
+		ret = EAGAIN;
 		goto err;
 	}
 
@@ -2754,7 +2755,6 @@ static int ibmvnic_set_channels(struct net_device *netdev,
 			    channels->rx_count, channels->tx_count,
 			    adapter->req_rx_queues, adapter->req_tx_queues);
 	return ret;
-
 }
 
 static void ibmvnic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
@@ -2843,8 +2843,8 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev,
 		return;
 
 	for (i = 0; i < ARRAY_SIZE(ibmvnic_stats); i++)
-		data[i] = be64_to_cpu(IBMVNIC_GET_STAT(adapter,
-						ibmvnic_stats[i].offset));
+		data[i] = be64_to_cpu(IBMVNIC_GET_STAT
+				      (adapter, ibmvnic_stats[i].offset));
 
 	for (j = 0; j < adapter->req_tx_queues; j++) {
 		data[i] = adapter->tx_stats_buffers[j].packets;
@@ -2884,6 +2884,7 @@ static int ibmvnic_set_priv_flags(struct net_device *netdev, u32 flags)
 
 	return 0;
 }
+
 static const struct ethtool_ops ibmvnic_ethtool_ops = {
 	.get_drvinfo		= ibmvnic_get_drvinfo,
 	.get_msglevel		= ibmvnic_get_msglevel,
@@ -3155,7 +3156,7 @@ static int enable_scrq_irq(struct ibmvnic_adapter *adapter,
 		/* H_EOI would fail with rc = H_FUNCTION when running
 		 * in XIVE mode which is expected, but not an error.
 		 */
-		if (rc && (rc != H_FUNCTION))
+		if (rc && rc != H_FUNCTION)
 			dev_err(dev, "H_EOI FAILED irq 0x%llx. rc=%ld\n",
 				val, rc);
 	}
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net-next 6/7] ibmvnic: add comments for spinlock_t definitions
  2021-01-12  6:42 [PATCH net-next 0/7] a set of fixes of coding style Lijun Pan
                   ` (4 preceding siblings ...)
  2021-01-12  6:43 ` [PATCH net-next 5/7] ibmvnic: fix miscellaneous checks Lijun Pan
@ 2021-01-12  6:43 ` Lijun Pan
  2021-01-12  6:43 ` [PATCH net-next 7/7] ibmvnic: remove unused spinlock_t stats_lock definition Lijun Pan
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Lijun Pan @ 2021-01-12  6:43 UTC (permalink / raw)
  To: netdev; +Cc: Lijun Pan

There are several spinlock_t definitions without comments.
Add them.

Signed-off-by: Lijun Pan <lijunp213@gmail.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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net-next 7/7] ibmvnic: remove unused spinlock_t stats_lock definition
  2021-01-12  6:42 [PATCH net-next 0/7] a set of fixes of coding style Lijun Pan
                   ` (5 preceding siblings ...)
  2021-01-12  6:43 ` [PATCH net-next 6/7] ibmvnic: add comments for spinlock_t definitions Lijun Pan
@ 2021-01-12  6:43 ` Lijun Pan
  2021-01-12 23:07 ` [PATCH net-next 0/7] a set of fixes of coding style Saeed Mahameed
  2021-01-12 23:54 ` Jakub Kicinski
  8 siblings, 0 replies; 11+ messages in thread
From: Lijun Pan @ 2021-01-12  6:43 UTC (permalink / raw)
  To: netdev; +Cc: Lijun Pan

stats_lock is no longer used. So remove it.

Signed-off-by: Lijun Pan <lijunp213@gmail.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 2 --
 drivers/net/ethernet/ibm/ibmvnic.h | 1 -
 2 files changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index f9db139f652b..d76d9934c7c3 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -5284,8 +5284,6 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
 	netdev->ethtool_ops = &ibmvnic_ethtool_ops;
 	SET_NETDEV_DEV(netdev, &dev->dev);
 
-	spin_lock_init(&adapter->stats_lock);
-
 	INIT_WORK(&adapter->ibmvnic_reset, __ibmvnic_reset);
 	INIT_DELAYED_WORK(&adapter->ibmvnic_delayed_reset,
 			  __ibmvnic_delayed_reset);
diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h
index 8f73a30a7593..270d1cac86a4 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.h
+++ b/drivers/net/ethernet/ibm/ibmvnic.h
@@ -987,7 +987,6 @@ struct ibmvnic_adapter {
 	struct ibmvnic_statistics stats;
 	dma_addr_t stats_token;
 	struct completion stats_done;
-	spinlock_t stats_lock;
 	int replenish_no_mem;
 	int replenish_add_buff_success;
 	int replenish_add_buff_failure;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH net-next 0/7] a set of fixes of coding style
  2021-01-12  6:42 [PATCH net-next 0/7] a set of fixes of coding style Lijun Pan
                   ` (6 preceding siblings ...)
  2021-01-12  6:43 ` [PATCH net-next 7/7] ibmvnic: remove unused spinlock_t stats_lock definition Lijun Pan
@ 2021-01-12 23:07 ` Saeed Mahameed
  2021-01-12 23:54 ` Jakub Kicinski
  8 siblings, 0 replies; 11+ messages in thread
From: Saeed Mahameed @ 2021-01-12 23:07 UTC (permalink / raw)
  To: Lijun Pan, netdev

On Tue, 2021-01-12 at 00:42 -0600, Lijun Pan wrote:
> This series address several coding style problems.
> 
> Lijun Pan (7):
>   ibmvnic: prefer 'unsigned long' over 'unsigned long int'
>   ibmvnic: fix block comments
>   ibmvnic: fix braces
>   ibmvnic: avoid multiple line dereference
>   ibmvnic: fix miscellaneous checks
>   ibmvnic: add comments for spinlock_t definitions
>   ibmvnic: remove unused spinlock_t stats_lock definition
> 
>  drivers/net/ethernet/ibm/ibmvnic.c | 65 +++++++++++++---------------
> --
>  drivers/net/ethernet/ibm/ibmvnic.h | 11 ++---
>  2 files changed, 35 insertions(+), 41 deletions(-)
> 
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net-next 0/7] a set of fixes of coding style
  2021-01-12  6:42 [PATCH net-next 0/7] a set of fixes of coding style Lijun Pan
                   ` (7 preceding siblings ...)
  2021-01-12 23:07 ` [PATCH net-next 0/7] a set of fixes of coding style Saeed Mahameed
@ 2021-01-12 23:54 ` Jakub Kicinski
  2021-01-13  6:04   ` Lijun Pan
  8 siblings, 1 reply; 11+ messages in thread
From: Jakub Kicinski @ 2021-01-12 23:54 UTC (permalink / raw)
  To: Lijun Pan; +Cc: netdev

On Tue, 12 Jan 2021 00:42:58 -0600 Lijun Pan wrote:
> This series address several coding style problems.

Erm, are you sure this series will not conflict with the fixes
Sukadev is sending?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net-next 0/7] a set of fixes of coding style
  2021-01-12 23:54 ` Jakub Kicinski
@ 2021-01-13  6:04   ` Lijun Pan
  0 siblings, 0 replies; 11+ messages in thread
From: Lijun Pan @ 2021-01-13  6:04 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: netdev

On Tue, Jan 12, 2021 at 5:54 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 12 Jan 2021 00:42:58 -0600 Lijun Pan wrote:
> > This series address several coding style problems.
>
> Erm, are you sure this series will not conflict with the fixes
> Sukadev is sending?

Maybe one or two if the fixes go to net. And not if they all
go to net-next. It looks like they going to net-next would be
a simpler solution for both of us.
It seems to me Suka's patches are more of refactoring and feature
changes (a new approach) though some of them claim to fix some bugs.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-01-13  6:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12  6:42 [PATCH net-next 0/7] a set of fixes of coding style Lijun Pan
2021-01-12  6:42 ` [PATCH net-next 1/7] ibmvnic: prefer 'unsigned long' over 'unsigned long int' Lijun Pan
2021-01-12  6:43 ` [PATCH net-next 2/7] ibmvnic: fix block comments Lijun Pan
2021-01-12  6:43 ` [PATCH net-next 3/7] ibmvnic: fix braces Lijun Pan
2021-01-12  6:43 ` [PATCH net-next 4/7] ibmvnic: avoid multiple line dereference Lijun Pan
2021-01-12  6:43 ` [PATCH net-next 5/7] ibmvnic: fix miscellaneous checks Lijun Pan
2021-01-12  6:43 ` [PATCH net-next 6/7] ibmvnic: add comments for spinlock_t definitions Lijun Pan
2021-01-12  6:43 ` [PATCH net-next 7/7] ibmvnic: remove unused spinlock_t stats_lock definition Lijun Pan
2021-01-12 23:07 ` [PATCH net-next 0/7] a set of fixes of coding style Saeed Mahameed
2021-01-12 23:54 ` Jakub Kicinski
2021-01-13  6:04   ` Lijun Pan

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).