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 4/8] ibmvnic: avoid multiple line dereference
Date: Thu, 11 Feb 2021 00:43:21 -0600 [thread overview]
Message-ID: <20210211064325.80591-5-lijunp213@gmail.com> (raw)
In-Reply-To: <20210211064325.80591-1-lijunp213@gmail.com>
Fix the following checkpatch warning:
WARNING: Avoid multiple line dereference
Signed-off-by: Lijun Pan <lijunp213@gmail.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.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 6c1fc73d66dc..67b09a53d7ac 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2440,9 +2440,8 @@ static int ibmvnic_poll(struct napi_struct *napi, int budget)
if (!pending_scrq(adapter, rx_scrq))
break;
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",
@@ -3855,15 +3854,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);
}
}
@@ -4406,8 +4405,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
next prev parent reply other threads:[~2021-02-11 6:44 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 ` Lijun Pan [this message]
2021-02-11 6:43 ` [PATCH net-next v2 5/8] ibmvnic: fix miscellaneous checks Lijun Pan
2021-02-11 6:43 ` [PATCH net-next v2 6/8] ibmvnic: add comments for spinlock_t definitions Lijun Pan
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-5-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).