Commit 24a5b0ce authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jason Gunthorpe

RDMA/bnxt_re: Remove a redundant 'memset'

'wqe' is already zeroed at the top of the 'while' loop, just a few lines
below, and is not used outside of the loop.

So there is no need to zero it again, or for the variable to be declared
outside the loop.

Link: https://lore.kernel.org/r/20200308065442.5415-1-christophe.jaillet@wanadoo.frSigned-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 32ac9e43
...@@ -2470,15 +2470,12 @@ static int bnxt_re_post_send_shadow_qp(struct bnxt_re_dev *rdev, ...@@ -2470,15 +2470,12 @@ static int bnxt_re_post_send_shadow_qp(struct bnxt_re_dev *rdev,
struct bnxt_re_qp *qp, struct bnxt_re_qp *qp,
const struct ib_send_wr *wr) const struct ib_send_wr *wr)
{ {
struct bnxt_qplib_swqe wqe;
int rc = 0, payload_sz = 0; int rc = 0, payload_sz = 0;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&qp->sq_lock, flags); spin_lock_irqsave(&qp->sq_lock, flags);
memset(&wqe, 0, sizeof(wqe));
while (wr) { while (wr) {
/* House keeping */ struct bnxt_qplib_swqe wqe = {};
memset(&wqe, 0, sizeof(wqe));
/* Common */ /* Common */
wqe.num_sge = wr->num_sge; wqe.num_sge = wr->num_sge;
......
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