Skip to content

Commit

Permalink
ibmvnic: avoid multiple line dereference
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lijun Pan authored and David S. Miller committed Feb 11, 2021
1 parent f78afaa commit 914789a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions drivers/net/ethernet/ibm/ibmvnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 914789a

Please sign in to comment.