]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/uverbs: Silence shiftTooManyBitsSigned warning
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 20 Jul 2020 17:56:27 +0000 (20:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:57 +0000 (11:41 +0100)
commit6cebdf3390c37baab869b0cbbeba56173af0b57b
tree6daa232e52ae9bf5152b6e2b5c507d8265cd2a16
parent07fc5f5b8509a1ca47e7df4c4bb0a5889336764b
RDMA/uverbs: Silence shiftTooManyBitsSigned warning

[ Upstream commit 79c85af5c944c3a7c187d9bf8495f8bf2f796cba ]

Fix reported by kbuild warning.

   drivers/infiniband/core/uverbs_cmd.c:1897:47: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
    BUILD_BUG_ON(IB_USER_LAST_QP_ATTR_MASK == (1 << 31));
                                                 ^
Link: https://lore.kernel.org/r/20200720175627.1273096-3-leon@kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Stable-dep-of: 8de8482fe573 ("RDMA/mlx5: Fix validation of max_rd_atomic caps for DC")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/core/uverbs_cmd.c