diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-03-08 07:54:42 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-03-10 14:33:21 -0300 |
commit | 24a5b0ce714210c69a8870d4a11ab6a8cff650c6 (patch) | |
tree | 80779cee7bd302a8de8ab98bf5a85a67088efa48 /drivers/infiniband | |
parent | 32ac9e4399b12d3e54d312a0e0e30ed5cd19bd4e (diff) | |
download | linux-24a5b0ce714210c69a8870d4a11ab6a8cff650c6.tar.bz2 |
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.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/bnxt_re/ib_verbs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index 47b0b50b71e7..95f6d493d1b9 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -2470,15 +2470,12 @@ static int bnxt_re_post_send_shadow_qp(struct bnxt_re_dev *rdev, struct bnxt_re_qp *qp, const struct ib_send_wr *wr) { - struct bnxt_qplib_swqe wqe; int rc = 0, payload_sz = 0; unsigned long flags; spin_lock_irqsave(&qp->sq_lock, flags); - memset(&wqe, 0, sizeof(wqe)); while (wr) { - /* House keeping */ - memset(&wqe, 0, sizeof(wqe)); + struct bnxt_qplib_swqe wqe = {}; /* Common */ wqe.num_sge = wr->num_sge; |