RDMA/bnxt_re: remove unnecessary call to memset
authorHimanshu Jha <himanshujha199640@gmail.com>
Fri, 25 Aug 2017 16:11:02 +0000 (21:41 +0530)
committerDoug Ledford <dledford@redhat.com>
Mon, 28 Aug 2017 23:12:25 +0000 (19:12 -0400)
call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c

index 43b3dee4b6ba5a90e89a5345ae404209cb4cafe6..01eee15bbd6598fa6ae103aa1b86a81023e67f1d 100644 (file)
@@ -911,7 +911,6 @@ static struct bnxt_re_ah *bnxt_re_create_shadow_qp_ah
        if (!ah)
                return NULL;
 
-       memset(ah, 0, sizeof(*ah));
        ah->rdev = rdev;
        ah->qplib_ah.pd = &pd->qplib_pd;
 
@@ -958,7 +957,6 @@ static struct bnxt_re_qp *bnxt_re_create_shadow_qp
        if (!qp)
                return NULL;
 
-       memset(qp, 0, sizeof(*qp));
        qp->rdev = rdev;
 
        /* Initialize the shadow QP structure from the QP1 values */