Skip to content

Commit

Permalink
RDMA/hns: Split bool statement and assign statement
Browse files Browse the repository at this point in the history
Assign statement can not be contained in bool statement or
function param.

Signed-off-by: Lang Cheng <chenglang@huawei.com>
Link: https://lore.kernel.org/r/1565276034-97329-9-git-send-email-oulijun@huawei.com
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Lang Cheng authored and Doug Ledford committed Aug 12, 2019
1 parent 0e20ebf commit e7f4044
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions drivers/infiniband/hw/hns/hns_roce_hw_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4938,16 +4938,15 @@ 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;
u32 srqn;
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
*/
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
*/
Expand All @@ -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);
Expand Down

0 comments on commit e7f4044

Please sign in to comment.