All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lijun Ou <oulijun@huawei.com>
To: <dledford@redhat.com>, <jgg@ziepe.ca>
Cc: <leon@kernel.org>, <linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
Subject: [PATCH for-next 08/13] RDMA/hns: Split bool statement and assign statement
Date: Tue, 30 Jul 2019 16:56:45 +0800	[thread overview]
Message-ID: <1564477010-29804-9-git-send-email-oulijun@huawei.com> (raw)
In-Reply-To: <1564477010-29804-1-git-send-email-oulijun@huawei.com>

From: Lang Cheng <chenglang@huawei.com>

Assign statement can not be contained in bool statement or
function param.

Signed-off-by: Lang Cheng <chenglang@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index fc4c1d6..85e0687a 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -4938,7 +4938,7 @@ static int hns_roce_v2_aeq_int(struct hns_roce_dev *hr_dev,
 			       struct hns_roce_eq *eq)
 {
 	struct device *dev = hr_dev->dev;
-	struct hns_roce_aeqe *aeqe;
+	struct hns_roce_aeqe *aeqe = next_aeqe_sw_v2(eq);
 	int aeqe_found = 0;
 	int event_type;
 	int sub_type;
@@ -4946,8 +4946,7 @@ static int hns_roce_v2_aeq_int(struct hns_roce_dev *hr_dev,
 	u32 qpn;
 	u32 cqn;
 
-	while ((aeqe = next_aeqe_sw_v2(eq))) {
-
+	while (aeqe) {
 		/* Make sure we read AEQ entry after we have checked the
 		 * ownership bit
 		 */
@@ -5016,6 +5015,8 @@ static int hns_roce_v2_aeq_int(struct hns_roce_dev *hr_dev,
 			eq->cons_index = 0;
 		}
 		hns_roce_v2_init_irq_work(hr_dev, eq, qpn, cqn);
+
+		aeqe = next_aeqe_sw_v2(eq);
 	}
 
 	set_eq_cons_index_v2(eq);
@@ -5068,12 +5069,11 @@ static int hns_roce_v2_ceq_int(struct hns_roce_dev *hr_dev,
 			       struct hns_roce_eq *eq)
 {
 	struct device *dev = hr_dev->dev;
-	struct hns_roce_ceqe *ceqe;
+	struct hns_roce_ceqe *ceqe = next_ceqe_sw_v2(eq);
 	int ceqe_found = 0;
 	u32 cqn;
 
-	while ((ceqe = next_ceqe_sw_v2(eq))) {
-
+	while (ceqe) {
 		/* Make sure we read CEQ entry after we have checked the
 		 * ownership bit
 		 */
@@ -5092,6 +5092,8 @@ static int hns_roce_v2_ceq_int(struct hns_roce_dev *hr_dev,
 			dev_warn(dev, "cons_index overflow, set back to 0.\n");
 			eq->cons_index = 0;
 		}
+
+		ceqe = next_ceqe_sw_v2(eq);
 	}
 
 	set_eq_cons_index_v2(eq);
-- 
1.9.1


  parent reply	other threads:[~2019-07-30  9:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30  8:56 [PATCH for-next 00/13] Updates for 5.3-rc2 Lijun Ou
2019-07-30  8:56 ` [PATCH for-next 01/13] RDMA/hns: Encapsulate some lines for setting sq size in user mode Lijun Ou
2019-07-30 11:16   ` Gal Pressman
2019-07-30 12:17     ` Jason Gunthorpe
2019-07-30 13:37       ` oulijun
2019-07-30  8:56 ` [PATCH for-next 02/13] RDMA/hns: Optimize hns_roce_modify_qp function Lijun Ou
2019-07-30 11:19   ` Gal Pressman
2019-07-30 13:39     ` oulijun
2019-07-30  8:56 ` [PATCH for-next 03/13] RDMA/hns: Update the prompt message for creating and destroy qp Lijun Ou
2019-07-30  8:56 ` [PATCH for-next 04/13] RDMA/hns: Remove unnessary init for cmq reg Lijun Ou
2019-07-30  8:56 ` [PATCH for-next 05/13] RDMA/hns: Clean up unnecessary initial assignment Lijun Ou
2019-07-30  8:56 ` [PATCH for-next 06/13] RDMA/hns: Update some comments style Lijun Ou
2019-07-30  8:56 ` [PATCH for-next 07/13] RDMA/hns: Handling the error return value of hem function Lijun Ou
2019-07-30  8:56 ` Lijun Ou [this message]
2019-07-30  8:56 ` [PATCH for-next 09/13] RDMA/hns: Refactor irq request code Lijun Ou
2019-07-30  8:56 ` [PATCH for-next 10/13] RDMA/hns: Remove unnecessary kzalloc Lijun Ou
2019-07-30 13:40   ` Leon Romanovsky
2019-07-31  2:43     ` oulijun
2019-07-31  7:49       ` Leon Romanovsky
     [not found]         ` <fab1c105-b367-7ca7-fa2f-b46808ae1b24@huawei.com>
2019-07-31  9:59           ` Leon Romanovsky
2019-07-31 13:02             ` Jason Gunthorpe
2019-07-30  8:56 ` [PATCH for-next 11/13] RDMA/hns: Refactor hns_roce_v2_set_hem for hip08 Lijun Ou
2019-07-30  8:56 ` [PATCH for-next 12/13] RDMA/hns: Remove redundant print in hns_roce_v2_ceq_int() Lijun Ou
2019-07-30  8:56 ` [PATCH for-next 13/13] RDMA/hns: Disable alw_lcl_lpbk of SSU Lijun Ou
2019-07-30 12:33 ` [PATCH for-next 00/13] Updates for 5.3-rc2 Dennis Dalessandro
2019-07-30 13:41   ` oulijun

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=1564477010-29804-9-git-send-email-oulijun@huawei.com \
    --to=oulijun@huawei.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.