Re: [PATCH V3 09/10] staging: vchiq_arm: Don't cast scatter-gather elements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 21, 2024 at 03:19:57PM +0200, Stefan Wahren wrote:
> The kernel uses different types for DMA length & address,
> so better use them.
> 
> Signed-off-by: Stefan Wahren <wahrenst@xxxxxxx>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> ---
>  .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c   | 6 +++---
>  1 file 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 e3d49d4bdb1d..9e6102c43e00 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;
> 

You can't actually use more than 32bits because *addrs is u32 and it's
part of the UAPI.

regards,
dan carpenter





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux