aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wahren <[email protected]>2024-06-21 15:19:57 +0200
committerGreg Kroah-Hartman <[email protected]>2024-06-24 15:26:56 +0200
commitfcc938c2986836532b3275184253d8d53a247518 (patch)
tree135d8e8406c11194e4a85aee0dd62c4b046f113c
parent0d49eee74a597ed0464e29b4724a53034e903b54 (diff)
staging: vchiq_arm: Don't cast scatter-gather elements
The kernel uses different types for DMA length & address, so better use them. Signed-off-by: Stefan Wahren <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index a8cf9233a624..472fddb1a2fe 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -162,7 +162,7 @@ cleanup_pagelistinfo(struct vchiq_instance *instance, struct vchiq_pagelist_info
}
static inline bool
-is_adjacent_block(u32 *addrs, u32 addr, unsigned int k)
+is_adjacent_block(u32 *addrs, dma_addr_t addr, unsigned int k)
{
u32 tmp;
@@ -377,8 +377,8 @@ create_pagelist(struct vchiq_instance *instance, char *buf, char __user *ubuf,
/* Combine adjacent blocks for performance */
k = 0;
for_each_sg(scatterlist, sg, dma_buffers, i) {
- u32 len = sg_dma_len(sg);
- u32 addr = sg_dma_address(sg);
+ unsigned int len = sg_dma_len(sg);
+ dma_addr_t addr = sg_dma_address(sg);
/* Note: addrs is the address + page_count - 1
* The firmware expects blocks after the first to be page-