Re: [PATCH 1/3] uio_dmem_genirq: Fix build failure on 32 bit builds with 64 bit physaddr
From: Greg Kroah-Hartman
Date: Sat Mar 23 2024 - 11:37:04 EST
On Sat, Mar 23, 2024 at 07:42:26AM -0700, Guenter Roeck wrote:
> Builds on 32-bit systems with 64 bit physical address fail with
>
> drivers/uio/uio_dmem_genirq.c: In function 'uio_dmem_genirq_open':
> drivers/uio/uio_dmem_genirq.c:63:39: error:
> cast from pointer to integer of different size
>
> drivers/uio/uio_dmem_genirq.c: In function 'uio_dmem_genirq_release':
> drivers/uio/uio_dmem_genirq.c:92:43: error:
> cast to pointer from integer of different size
>
> The conversion itself is safe since sizeof(phys_addr_t) it in general equal
> to or larger than sizeof(void *). Solve the problem by double-casting the
> conversion.
>
> Fixes: 019947805a8d ("uio_dmem_genirq: UIO_MEM_DMA_COHERENT conversion")
> Cc: Chris Leech <cleech@xxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> ---
> drivers/uio/uio_dmem_genirq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks for these, Chris, any objection to me queueing them up?
greg k-h