RDMA/mlx5: Silence the overflow warning while building offset mask
Subsystems (2)
PATCH 1/1 RDMA/mlx5: Silence the overflow warning while building offset mask
From: Leon Romanovsky <[email protected]>
The coverity reports "Potentially overflowing expression ..." warning, which is correct thing to complain from the compiler point of view, but this is not possible in the current code.
Fixes b045db62f6f6 ("RDMA/mlx5: Use ib_umem_find_best_pgoff() for SRQ")
Signed-off-by Leon Romanovsky <[email protected]>
--- drivers/infiniband/hw/mlx5/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/mem.c +1 -1
@@ -62,7 +62,7 @@ unsigned long __mlx5_umem_find_best_quantized_pgoff( unsigned int page_offset_bits, u64 pgoff_bitmask, unsigned int scale, unsigned int *page_offset_quantized) { - const u64 page_offset_mask = (1 << page_offset_bits) - 1; + const u64 page_offset_mask = (1UL << page_offset_bits) - 1;unsigned long page_size;u64 page_offset;
Signature · 1 line
2.28.0
Quoted 11 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
The coverity reports "Potentially overflowing expression ..." warning, which is correct thing to complain from the compiler point of view, but this is not possible in the current code.
Fixes b045db62f6f6 ("RDMA/mlx5: Use ib_umem_find_best_pgoff() for SRQ")Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/hw/mlx5/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason