1
0
Fork 0
alistair23-linux/drivers/infiniband
Nathan Chancellor 0769cdddb8 RDMA/core: Fix use of logical OR in get_new_pps
[ Upstream commit 4ca501d6aa ]

Clang warns:

../drivers/infiniband/core/security.c:351:41: warning: converting the
enum constant to a boolean [-Wint-in-bool-context]
        if (!(qp_attr_mask & (IB_QP_PKEY_INDEX || IB_QP_PORT)) && qp_pps) {
                                               ^
1 warning generated.

A bitwise OR should have been used instead.

Fixes: 1dd017882e ("RDMA/core: Fix protection fault in get_pkey_idx_qp_list")
Link: https://lore.kernel.org/r/20200217204318.13609-1-natechancellor@gmail.com
Link: https://github.com/ClangBuiltLinux/linux/issues/889
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-03-12 13:00:09 +01:00
..
core RDMA/core: Fix use of logical OR in get_new_pps 2020-03-12 13:00:09 +01:00
hw RDMA/hns: Bugfix for posting a wqe with sge 2020-03-05 16:43:49 +01:00
sw RDMA/siw: Remove unwanted WARN_ON in siw_cm_llp_data_ready() 2020-03-05 16:43:38 +01:00
ulp scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout" 2020-02-28 17:22:25 +01:00
Kconfig RDMA/odp: Use the common interval tree library instead of generic 2019-08-21 13:34:09 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00