All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Shiraz Saleem <shiraz.saleem@intel.com>
Cc: dledford@redhat.com, linux-rdma@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH rdma-next] irdma: Store PBL info address a pointer type
Date: Thu, 10 Jun 2021 09:44:54 -0300	[thread overview]
Message-ID: <20210610124454.GA1264557@nvidia.com> (raw)
In-Reply-To: <20210609234924.938-1-shiraz.saleem@intel.com>

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@intel.com>
> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
> ---
>  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

  reply	other threads:[~2021-06-10 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 23:49 [PATCH rdma-next] irdma: Store PBL info address a pointer type Shiraz Saleem
2021-06-10 12:44 ` Jason Gunthorpe [this message]
2021-06-10 12:49   ` Saleem, Shiraz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210610124454.GA1264557@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=dledford@redhat.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=shiraz.saleem@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.