Skip to content

Commit fcc938c

Browse files
lategoodbyegregkh
authored andcommitted
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]>
1 parent 0d49eee commit fcc938c

File tree

1 file changed

+3
-3
lines changed
  • drivers/staging/vc04_services/interface/vchiq_arm

1 file changed

+3
-3
lines changed

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ cleanup_pagelistinfo(struct vchiq_instance *instance, struct vchiq_pagelist_info
162162
}
163163

164164
static inline bool
165-
is_adjacent_block(u32 *addrs, u32 addr, unsigned int k)
165+
is_adjacent_block(u32 *addrs, dma_addr_t addr, unsigned int k)
166166
{
167167
u32 tmp;
168168

@@ -377,8 +377,8 @@ create_pagelist(struct vchiq_instance *instance, char *buf, char __user *ubuf,
377377
/* Combine adjacent blocks for performance */
378378
k = 0;
379379
for_each_sg(scatterlist, sg, dma_buffers, i) {
380-
u32 len = sg_dma_len(sg);
381-
u32 addr = sg_dma_address(sg);
380+
unsigned int len = sg_dma_len(sg);
381+
dma_addr_t addr = sg_dma_address(sg);
382382

383383
/* Note: addrs is the address + page_count - 1
384384
* The firmware expects blocks after the first to be page-

0 commit comments

Comments
 (0)