summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core
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/core
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/core')
-rw-r--r--drivers/infiniband/core/netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 1b2cc9e45ade..ae2db0c70788 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -75,7 +75,7 @@ static bool is_nl_msg_valid(unsigned int type, unsigned int op)
if (type >= RDMA_NL_NUM_CLIENTS)
return false;
- return (op < max_num_ops[type]) ? true : false;
+ return op < max_num_ops[type];
}
static const struct rdma_nl_cbs *