summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2023-08-14 01:47:47 +0200
committerTom Rini <[email protected]>2023-08-22 15:17:52 -0400
commit3f9cff669bbc4ed48ede1705fbaf671f3f4ce0e1 (patch)
treed1c8cd2549b6c3da0e6d8fe4abc7aa5aff740eb9 /common
parent7f0fba9fb08fb7d31060848c719ffad3739e9d58 (diff)
common: bouncebuf: Add missing cast to dma_addr_t
Fix the following warning produced on qemu-x86_64_defconfig: " common/bouncebuf.c: In function ‘bounce_buffer_stop’: common/bouncebuf.c:82:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 82 | dma_unmap_single((dma_addr_t)state->bounce_buffer, | ^ " The warning is valid, the pointer has to be up-cast first. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Andrew Davis <[email protected]>
Diffstat (limited to 'common')
-rw-r--r--common/bouncebuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/bouncebuf.c b/common/bouncebuf.c
index 93a35668cc2..934b83f7ec3 100644
--- a/common/bouncebuf.c
+++ b/common/bouncebuf.c
@@ -79,7 +79,7 @@ int bounce_buffer_stop(struct bounce_buffer *state)
{
if (state->flags & GEN_BB_WRITE) {
/* Invalidate cache so that CPU can see any newly DMA'd data */
- dma_unmap_single((dma_addr_t)state->bounce_buffer,
+ dma_unmap_single((dma_addr_t)(uintptr_t)state->bounce_buffer,
state->len_aligned,
DMA_BIDIRECTIONAL);
}