Skip to content

Commit 5244ca8

Browse files
arndbjgunthorpe
authored andcommitted
RDMA/siw: Fix pointer cast warning
The previous build fix left a remaining issue in configurations with 64-bit dma_addr_t on 32-bit architectures: drivers/infiniband/sw/siw/siw_qp_tx.c: In function 'siw_get_pblpage': drivers/infiniband/sw/siw/siw_qp_tx.c:32:37: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 32 | return virt_to_page((void *)paddr); | ^ Use the same double cast here that the driver uses elsewhere to convert between dma_addr_t and void*. Fixes: 0d1b756 ("RDMA/siw: Pass a pointer to virt_to_page()") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Bernard Metzler <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 5fc24e6 commit 5244ca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/sw/siw/siw_qp_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static struct page *siw_get_pblpage(struct siw_mem *mem, u64 addr, int *idx)
2929
dma_addr_t paddr = siw_pbl_get_buffer(pbl, offset, NULL, idx);
3030

3131
if (paddr)
32-
return virt_to_page((void *)paddr);
32+
return virt_to_page((void *)(uintptr_t)paddr);
3333

3434
return NULL;
3535
}

0 commit comments

Comments
 (0)