RDMA/efa: Remove possible negative shift
Subsystems (2)
Michael Margolin
maintainerPATCH 1/1 RDMA/efa: Remove possible negative shift
The page size used for device might in some cases be smaller than PAGE_SIZE what results in a negative shift when calculating the number of host pages in PAGE_SIZE for a debug log. Remove the debug line together with the calculation.
--- drivers/infiniband/hw/efa/efa_verbs.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/infiniband/hw/efa/efa_verbs.c +0 -4
@@ -1320,13 +1320,9 @@ static int umem_to_page_list(struct efa_dev *dev, u32 hp_cnt, u8 hp_shift) { -u32 pages_in_hp =BIT (hp_shift -PAGE_SHIFT );struct ib_block_iter biter;unsigned int hp_idx =0 ; -ibdev_dbg (&dev->ibdev,"hp_cnt[%u], pages_in_hp[%u]\n" , - hp_cnt, pages_in_hp); -rdma_umem_for_each_dma_block (umem, &biter,BIT (hp_shift)) page_list[hp_idx++] =rdma_block_iter_dma_address (&biter);
Signature · 1 line
2.47.3
Quoted 8 lines · Michael Margolin
The page size used for device might in some cases be smaller than
PAGE_SIZEwhat results in a negative shift when calculating the number of host pages inPAGE_SIZEfor a debug log. Remove the debug line together with the calculation.Reviewed-by Tom Sela <[email protected]>Reviewed-by Yonatan Nachum <[email protected]>Signed-off-by Michael Margolin <[email protected]>
I don't know if you target this to -rc or -next, but this probably deserves a Fixes tag.
Jason Gunthorpe
maintainerQuoted 5 lines · Michael Margolin
The page size used for device might in some cases be smaller than
PAGE_SIZEwhat results in a negative shift when calculating the number of host pages inPAGE_SIZEfor a debug log. Remove the debug line together with the calculation.
Quoted 7 lines
Reviewed-by Tom Sela <[email protected]>Reviewed-by Yonatan Nachum <[email protected]>Signed-off-by Michael Margolin <[email protected]>Reviewed-by Gal Pressman <[email protected]>--- drivers/infiniband/hw/efa/efa_verbs.c | 4 ---- 1 file changed, 4 deletions(-)
I added
Jason