]> git.ipfire.org Git - thirdparty/u-boot.git/commit
dma: ti: k3-udma: fix dma_addr_t typecasts
authorAnshul Dalal <anshuld@ti.com>
Wed, 3 Sep 2025 11:52:05 +0000 (17:22 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 11 Sep 2025 16:03:02 +0000 (10:03 -0600)
commite9e55fefb1ec3e1d2525ef69655914c17e913c4c
tree7c64628b48acc63038ed62c906d8564692023b65
parent93c3404de9b2320bfd07cd3ce4ab0660f0d39523
dma: ti: k3-udma: fix dma_addr_t typecasts

dma_addr_t is used to store any valid DMA address which might not
necessarily be the same size as host architecture's word size. Though
various typecasts in k3's dma and usb driver expect dma_addr_t to be the
same size as the word size.

This leads the compiler to throw a "cast from pointer to integer of
different size" warning when the condition is not met, for example when
enabling CONFIG_DMA_ADDR_T_64BIT for the R5 core.

Therefore this patch fixes the typecasts by using 'uintptr_t' as an
intermediary type which is guaranteed to be the same size as void* on
the host architecture. Thus, eliminating the compiler warning.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
drivers/dma/ti/k3-udma.c
drivers/usb/dwc3/ep0.c