Blob Blame History Raw
From: Himanshu Jha <himanshujha199640@gmail.com>
Date: Fri, 25 Aug 2017 21:41:02 +0530
Subject: RDMA/bnxt_re: remove unnecessary call to memset
Patch-mainline: v4.14-rc1
Git-commit: 2d72d6c4ec1e3761e8cfc69d58d498b2dbe46341
References: bsc#1050244 FATE#322915

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>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c |    2 --
 1 file changed, 2 deletions(-)

--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -911,7 +911,6 @@ static struct bnxt_re_ah *bnxt_re_create
 	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
 	if (!qp)
 		return NULL;
 
-	memset(qp, 0, sizeof(*qp));
 	qp->rdev = rdev;
 
 	/* Initialize the shadow QP structure from the QP1 values */