Skip to content

Commit 6407c69

Browse files
tatyana-enjgunthorpe
authored andcommitted
RDMA/irdma: Fix unused variable total_size warning
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] Link: https://lore.kernel.org/r/[email protected] Link: https://lkml.org/lkml/2021/7/1/726 Reported-by: kernel test robot <[email protected]> Fixes: 551c46e ("RDMA/irdma: Add user/kernel shared libraries") Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Tatyana Nikolova <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 0c23af5 commit 6407c69

File tree

1 file changed

+1
-4
lines changed
  • drivers/infiniband/hw/irdma

1 file changed

+1
-4
lines changed

drivers/infiniband/hw/irdma/uk.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -931,17 +931,14 @@ enum irdma_status_code irdma_uk_mw_bind(struct irdma_qp_uk *qp,
931931
enum irdma_status_code irdma_uk_post_receive(struct irdma_qp_uk *qp,
932932
struct irdma_post_rq_info *info)
933933
{
934-
u32 total_size = 0, wqe_idx, i, byte_off;
934+
u32 wqe_idx, i, byte_off;
935935
u32 addl_frag_cnt;
936936
__le64 *wqe;
937937
u64 hdr;
938938

939939
if (qp->max_rq_frag_cnt < info->num_sges)
940940
return IRDMA_ERR_INVALID_FRAG_COUNT;
941941

942-
for (i = 0; i < info->num_sges; i++)
943-
total_size += info->sg_list[i].len;
944-
945942
wqe = irdma_qp_get_next_recv_wqe(qp, &wqe_idx);
946943
if (!wqe)
947944
return IRDMA_ERR_QP_TOOMANY_WRS_POSTED;

0 commit comments

Comments
 (0)