Re: [PATCH rdma-next] irdma: Store PBL info address a pointer type

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

 



On Wed, Jun 09, 2021 at 06:49:24PM -0500, Shiraz Saleem wrote:
> The level1 PBL info address is stored as u64.
> This requires casting through a uinptr_t before used
> as a pointer type.
> 
> And this leads to sparse warning such as this when
> uinptr_t is missing:
> 
> drivers/infiniband/hw/irdma/hw.c: In function 'irdma_destroy_virt_aeq':
> drivers/infiniband/hw/irdma/hw.c:579:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>   579 |  dma_addr_t *pg_arr = (dma_addr_t *)aeq->palloc.level1.addr;
> 
> This can be fixed using an intermediate uintptr_t, but
> rather it is better to fix the structure irdm_pble_info
> to store the address as u64* and the VA it is assigned in
> irdma_chunk as a void*. This greatly reduces the casting on
> this address.
> 
> Fixes: 44d9e52977a1 ("RDMA/irdma: Implement device initialization definitions")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx>
> ---
>  drivers/infiniband/hw/irdma/hw.c    |  2 +-
>  drivers/infiniband/hw/irdma/pble.c  | 13 ++++++-------
>  drivers/infiniband/hw/irdma/pble.h  |  6 +++---
>  drivers/infiniband/hw/irdma/utils.c | 10 +++++-----
>  drivers/infiniband/hw/irdma/verbs.c | 16 ++++++++--------
>  5 files changed, 23 insertions(+), 24 deletions(-)

Applied to for-next, but please be careful with the commit messages,
the tag should be 'RDMA/irdma' and word wrap to the standard 74 cols,
not alot less. I fixed it up

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux