Messages in this thread |  | | From | Linus Walleij <> | Date | Fri, 16 Dec 2022 08:46:16 +0100 | Subject | Re: [PATCH] RDMA/siw: fix pointer cast warning |
| |
On Thu, Dec 15, 2022 at 6:03 PM Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de> > > 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*. > > It took me a while to figure out why this driver does it > like this, as there is no hardware access and it just stores > kernel pointers in place of device addresses when communicating > with the rdma core and with user space. > > Fixes: 0d1b756acf60 ("RDMA/siw: Pass a pointer to virt_to_page()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This driver is a big confusion for me too.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours, Linus Walleij
|  |