diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-05-31 11:21:01 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-06-07 19:56:26 +0200 |
commit | fa027328a1c93d72031e6cc6b4a7eee967fd7406 (patch) | |
tree | 522920f26e57e5944a7c861e7ba006ff5962d8f2 /drivers/infiniband/hw/hns | |
parent | RDMA/srp: Accept again source addresses that do not have a port number (diff) | |
download | linux-fa027328a1c93d72031e6cc6b4a7eee967fd7406.tar.xz linux-fa027328a1c93d72031e6cc6b4a7eee967fd7406.zip |
RDMA/hns: fix inverted logic of readl read and shift
A previous change incorrectly changed the inverted logic and logically
negated the readl rather than the shifted readl result. Fix this by
adding in missing parentheses around the expression that needs to be
logically negated.
Addresses-Coverity: ("Logically dead code")
Fixes: 669cefb654cb ("RDMA/hns: Remove jiffies operation in disable interrupt context")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hns')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_hem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.c b/drivers/infiniband/hw/hns/hns_roce_hem.c index 157c84a1f55f..8490a86c3ef0 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hem.c +++ b/drivers/infiniband/hw/hns/hns_roce_hem.c @@ -378,7 +378,7 @@ static int hns_roce_set_hem(struct hns_roce_dev *hr_dev, end = HW_SYNC_TIMEOUT_MSECS; while (end) { - if (!readl(bt_cmd) >> BT_CMD_SYNC_SHIFT) + if (!(readl(bt_cmd) >> BT_CMD_SYNC_SHIFT)) break; mdelay(HW_SYNC_SLEEP_TIME_INTERVAL); |