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>
Subject: [PATCH net-next 4/7] ibmvnic: avoid multiple line dereference
Date: Tue, 12 Jan 2021 00:43:02 -0600	[thread overview]
Message-ID: <20210112064305.31606-5-lijunp213@gmail.com> (raw)
In-Reply-To: <20210112064305.31606-1-lijunp213@gmail.com>

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


  parent reply	other threads:[~2021-01-12  6:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Lijun Pan [this message]
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

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=20210112064305.31606-5-lijunp213@gmail.com \
    --to=lijunp213@gmail.com \
    --cc=netdev@vger.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 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).