All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-next] irdma: Fix unused variable total_size warning
@ 2021-07-07 21:14 Tatyana Nikolova
  2021-07-08 14:30 ` Leon Romanovsky
  2021-07-12 18:11 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Tatyana Nikolova @ 2021-07-07 21:14 UTC (permalink / raw)
  To: jgg, dledford, leon; +Cc: linux-rdma, Tatyana Nikolova, kernel test robot

Fix the following unused variable warning:
>> drivers/infiniband/hw/irdma/uk.c:934:6: warning: variable 'total_size'
set but not used [-Wunused-but-set-variable]
           u32 total_size = 0, wqe_idx, i, byte_off;

Link: https://lkml.org/lkml/2021/7/1/726
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 551c46edc769 ("RDMA/irdma: Add user/kernel shared libraries")
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
---
 drivers/infiniband/hw/irdma/uk.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/irdma/uk.c b/drivers/infiniband/hw/irdma/uk.c
index a6d52c20091c..5fb92de1f015 100644
--- a/drivers/infiniband/hw/irdma/uk.c
+++ b/drivers/infiniband/hw/irdma/uk.c
@@ -931,7 +931,7 @@ enum irdma_status_code irdma_uk_mw_bind(struct irdma_qp_uk *qp,
 enum irdma_status_code irdma_uk_post_receive(struct irdma_qp_uk *qp,
 					     struct irdma_post_rq_info *info)
 {
-	u32 total_size = 0, wqe_idx, i, byte_off;
+	u32 wqe_idx, i, byte_off;
 	u32 addl_frag_cnt;
 	__le64 *wqe;
 	u64 hdr;
@@ -939,9 +939,6 @@ enum irdma_status_code irdma_uk_post_receive(struct irdma_qp_uk *qp,
 	if (qp->max_rq_frag_cnt < info->num_sges)
 		return IRDMA_ERR_INVALID_FRAG_COUNT;
 
-	for (i = 0; i < info->num_sges; i++)
-		total_size += info->sg_list[i].len;
-
 	wqe = irdma_qp_get_next_recv_wqe(qp, &wqe_idx);
 	if (!wqe)
 		return IRDMA_ERR_QP_TOOMANY_WRS_POSTED;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH rdma-next] irdma: Fix unused variable total_size warning
  2021-07-07 21:14 [PATCH rdma-next] irdma: Fix unused variable total_size warning Tatyana Nikolova
@ 2021-07-08 14:30 ` Leon Romanovsky
  2021-07-12 18:11 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2021-07-08 14:30 UTC (permalink / raw)
  To: Tatyana Nikolova; +Cc: jgg, dledford, linux-rdma, kernel test robot

On Wed, Jul 07, 2021 at 02:14:55PM -0700, Tatyana Nikolova wrote:
> Fix the following unused variable warning:
> >> drivers/infiniband/hw/irdma/uk.c:934:6: warning: variable 'total_size'
> set but not used [-Wunused-but-set-variable]
>            u32 total_size = 0, wqe_idx, i, byte_off;
> 
> Link: https://lkml.org/lkml/2021/7/1/726
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 551c46edc769 ("RDMA/irdma: Add user/kernel shared libraries")
> Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
> Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
> ---
>  drivers/infiniband/hw/irdma/uk.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH rdma-next] irdma: Fix unused variable total_size warning
  2021-07-07 21:14 [PATCH rdma-next] irdma: Fix unused variable total_size warning Tatyana Nikolova
  2021-07-08 14:30 ` Leon Romanovsky
@ 2021-07-12 18:11 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2021-07-12 18:11 UTC (permalink / raw)
  To: Tatyana Nikolova; +Cc: dledford, leon, linux-rdma, kernel test robot

On Wed, Jul 07, 2021 at 02:14:55PM -0700, Tatyana Nikolova wrote:
> Fix the following unused variable warning:
> >> drivers/infiniband/hw/irdma/uk.c:934:6: warning: variable 'total_size'
> set but not used [-Wunused-but-set-variable]
>            u32 total_size = 0, wqe_idx, i, byte_off;
> 
> Link: https://lkml.org/lkml/2021/7/1/726
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 551c46edc769 ("RDMA/irdma: Add user/kernel shared libraries")
> Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
> Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  drivers/infiniband/hw/irdma/uk.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

Applied to for-rc, thanks

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-12 18:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 21:14 [PATCH rdma-next] irdma: Fix unused variable total_size warning Tatyana Nikolova
2021-07-08 14:30 ` Leon Romanovsky
2021-07-12 18:11 ` Jason Gunthorpe

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.