public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Ruan Jinjie <ruanjinjie@huawei.com>
Cc: linux-rdma@vger.kernel.org,
	Mustafa Ismail <mustafa.ismail@intel.com>,
	Shiraz Saleem <shiraz.saleem@intel.com>,
	Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [PATCH -next v2] RDMA/irdma: Silence the warnings in irdma_uk_rdma_write()
Date: Mon, 14 Aug 2023 10:07:44 +0300	[thread overview]
Message-ID: <20230814070744.GB3921@unreal> (raw)
In-Reply-To: <20230814015805.1002656-1-ruanjinjie@huawei.com>

On Mon, Aug 14, 2023 at 09:58:05AM +0800, Ruan Jinjie wrote:
> Remove sparse warnings introduced by commit 272bba19d631 ("RDMA: Remove
> unnecessary ternary operators"):
> 
> drivers/infiniband/hw/irdma/uk.c:285:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected bool [usertype] push_wqe:1 @@     got restricted __le32 [usertype] *push_db @@
> drivers/infiniband/hw/irdma/uk.c:285:24: sparse:     expected bool [usertype] push_wqe:1
> drivers/infiniband/hw/irdma/uk.c:285:24: sparse:     got restricted __le32 [usertype] *push_db
> drivers/infiniband/hw/irdma/uk.c:386:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected bool [usertype] push_wqe:1 @@     got restricted __le32 [usertype] *push_db @@
> drivers/infiniband/hw/irdma/uk.c:386:24: sparse:     expected bool [usertype] push_wqe:1
> drivers/infiniband/hw/irdma/uk.c:386:24: sparse:     got restricted __le32 [usertype] *push_db
> drivers/infiniband/hw/irdma/uk.c:471:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected bool [usertype] push_wqe:1 @@     got restricted __le32 [usertype] *push_db @@
> drivers/infiniband/hw/irdma/uk.c:471:24: sparse:     expected bool [usertype] push_wqe:1
> drivers/infiniband/hw/irdma/uk.c:471:24: sparse:     got restricted __le32 [usertype] *push_db
> drivers/infiniband/hw/irdma/uk.c:723:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected bool [usertype] push_wqe:1 @@     got restricted __le32 [usertype] *push_db @@
> drivers/infiniband/hw/irdma/uk.c:723:24: sparse:     expected bool [usertype] push_wqe:1
> drivers/infiniband/hw/irdma/uk.c:723:24: sparse:     got restricted __le32 [usertype] *push_db
> drivers/infiniband/hw/irdma/uk.c:797:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected bool [usertype] push_wqe:1 @@     got restricted __le32 [usertype] *push_db @@
> drivers/infiniband/hw/irdma/uk.c:797:24: sparse:     expected bool [usertype] push_wqe:1
> drivers/infiniband/hw/irdma/uk.c:797:24: sparse:     got restricted __le32 [usertype] *push_db
> drivers/infiniband/hw/irdma/uk.c:875:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected bool [usertype] push_wqe:1 @@     got restricted __le32 [usertype] *push_db @@
> drivers/infiniband/hw/irdma/uk.c:875:24: sparse:     expected bool [usertype] push_wqe:1
> drivers/infiniband/hw/irdma/uk.c:875:24: sparse:     got restricted __le32 [usertype] *push_db
> 

Fixes: 272bba19d631 ("RDMA: Remove unnecessary ternary operators")

> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202308110251.BV6BcwUR-lkp@intel.com/
> ---
> v2:
> - Use "qp->push_mode" check instead of "qp->push_db"
> ---
>  drivers/infiniband/hw/irdma/uk.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Let's wait to get Shiraz's opinion about this patch.
If it is ok, I'll add Fixes line and apply.

Thanks

> 
> diff --git a/drivers/infiniband/hw/irdma/uk.c b/drivers/infiniband/hw/irdma/uk.c
> index a0739503140d..f7150aa75827 100644
> --- a/drivers/infiniband/hw/irdma/uk.c
> +++ b/drivers/infiniband/hw/irdma/uk.c
> @@ -282,7 +282,7 @@ int irdma_uk_rdma_write(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
>  	bool read_fence = false;
>  	u16 quanta;
>  
> -	info->push_wqe = qp->push_db;
> +	info->push_wqe = qp->push_mode;
>  
>  	op_info = &info->op.rdma_write;
>  	if (op_info->num_lo_sges > qp->max_sq_frag_cnt)
> @@ -383,7 +383,7 @@ int irdma_uk_rdma_read(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
>  	u16 quanta;
>  	u64 hdr;
>  
> -	info->push_wqe = qp->push_db;
> +	info->push_wqe = qp->push_mode;
>  
>  	op_info = &info->op.rdma_read;
>  	if (qp->max_sq_frag_cnt < op_info->num_lo_sges)
> @@ -468,7 +468,7 @@ int irdma_uk_send(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
>  	bool read_fence = false;
>  	u16 quanta;
>  
> -	info->push_wqe = qp->push_db;
> +	info->push_wqe = qp->push_mode;
>  
>  	op_info = &info->op.send;
>  	if (qp->max_sq_frag_cnt < op_info->num_sges)
> @@ -720,7 +720,7 @@ int irdma_uk_inline_rdma_write(struct irdma_qp_uk *qp,
>  	u32 i, total_size = 0;
>  	u16 quanta;
>  
> -	info->push_wqe = qp->push_db;
> +	info->push_wqe = qp->push_mode;
>  	op_info = &info->op.rdma_write;
>  
>  	if (unlikely(qp->max_sq_frag_cnt < op_info->num_lo_sges))
> @@ -794,7 +794,7 @@ int irdma_uk_inline_send(struct irdma_qp_uk *qp,
>  	u32 i, total_size = 0;
>  	u16 quanta;
>  
> -	info->push_wqe = qp->push_db;
> +	info->push_wqe = qp->push_mode;
>  	op_info = &info->op.send;
>  
>  	if (unlikely(qp->max_sq_frag_cnt < op_info->num_sges))
> @@ -872,7 +872,7 @@ int irdma_uk_stag_local_invalidate(struct irdma_qp_uk *qp,
>  	bool local_fence = false;
>  	struct ib_sge sge = {};
>  
> -	info->push_wqe = qp->push_db;
> +	info->push_wqe = qp->push_mode;
>  	op_info = &info->op.inv_local_stag;
>  	local_fence = info->local_fence;
>  
> -- 
> 2.34.1
> 

      reply	other threads:[~2023-08-14  7:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14  1:58 [PATCH -next v2] RDMA/irdma: Silence the warnings in irdma_uk_rdma_write() Ruan Jinjie
2023-08-14  7:07 ` Leon Romanovsky [this message]

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=20230814070744.GB3921@unreal \
    --to=leon@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mustafa.ismail@intel.com \
    --cc=ruanjinjie@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox