Commit e59a5cec authored by Kalesh AP's avatar Kalesh AP Committed by Leon Romanovsky

RDMA/bnxt_re: Cleanup bnxt_re_process_raw_qp_pkt_rx() function

 - Remove unnecessary memset by initializing the variables
   during declaration itself.
 - Arranged variable declarartion in RCT order.
Signed-off-by: default avatarKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/1691052326-32143-5-git-send-email-selvin.xavier@broadcom.comSigned-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent c9f3e4e1
...@@ -3333,26 +3333,21 @@ static int bnxt_re_process_raw_qp_pkt_rx(struct bnxt_re_qp *gsi_qp, ...@@ -3333,26 +3333,21 @@ static int bnxt_re_process_raw_qp_pkt_rx(struct bnxt_re_qp *gsi_qp,
struct bnxt_re_dev *rdev = gsi_qp->rdev; struct bnxt_re_dev *rdev = gsi_qp->rdev;
struct bnxt_re_sqp_entries *sqp_entry = NULL; struct bnxt_re_sqp_entries *sqp_entry = NULL;
struct bnxt_re_qp *gsi_sqp = rdev->gsi_ctx.gsi_sqp; struct bnxt_re_qp *gsi_sqp = rdev->gsi_ctx.gsi_sqp;
dma_addr_t shrq_hdr_buf_map;
struct ib_sge s_sge[2] = {};
struct ib_sge r_sge[2] = {};
struct bnxt_re_ah *gsi_sah; struct bnxt_re_ah *gsi_sah;
struct ib_recv_wr rwr = {};
dma_addr_t rq_hdr_buf_map;
struct ib_ud_wr udwr = {};
struct ib_send_wr *swr; struct ib_send_wr *swr;
struct ib_ud_wr udwr; u32 skip_bytes = 0;
struct ib_recv_wr rwr;
int pkt_type = 0; int pkt_type = 0;
u32 tbl_idx;
void *rq_hdr_buf; void *rq_hdr_buf;
dma_addr_t rq_hdr_buf_map;
dma_addr_t shrq_hdr_buf_map;
u32 offset = 0; u32 offset = 0;
u32 skip_bytes = 0; u32 tbl_idx;
struct ib_sge s_sge[2];
struct ib_sge r_sge[2];
int rc; int rc;
memset(&udwr, 0, sizeof(udwr));
memset(&rwr, 0, sizeof(rwr));
memset(&s_sge, 0, sizeof(s_sge));
memset(&r_sge, 0, sizeof(r_sge));
swr = &udwr.wr; swr = &udwr.wr;
tbl_idx = cqe->wr_id; tbl_idx = cqe->wr_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment