summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns
diff options
context:
space:
mode:
authorRuan Jinjie <ruanjinjie@huawei.com>2023-07-31 16:51:18 +0800
committerLeon Romanovsky <leon@kernel.org>2023-07-31 15:16:12 +0300
commit272bba19d631e21e47f6ffa5654d3c17c57ea2ac (patch)
treee70b52a6e6cc11473c289c61b648bb723bfb1b27 /drivers/infiniband/hw/hns
parentf0ff2a2dd08df50656961c26c06c7091e3792123 (diff)
downloadlinux-272bba19d631e21e47f6ffa5654d3c17c57ea2ac.tar.gz
linux-272bba19d631e21e47f6ffa5654d3c17c57ea2ac.tar.bz2
linux-272bba19d631e21e47f6ffa5654d3c17c57ea2ac.zip
RDMA: Remove unnecessary ternary operators
There are a little ternary operators, the true or false judgment of which is unnecessary in C language semantics. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230731085118.394443-1-ruanjinjie@huawei.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/hns')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hem.c2
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 47c0efed1821..c4ac06a33869 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hem.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hem.c
@@ -78,7 +78,7 @@ bool hns_roce_check_whether_mhop(struct hns_roce_dev *hr_dev, u32 type)
return false;
}
- return hop_num ? true : false;
+ return hop_num;
}
static bool hns_roce_check_hem_null(struct hns_roce_hem **hem, u64 hem_idx,