From: Himanshu Jha <himanshujha199640@gmail.com>
To: selvin.xavier@broadcom.com
Cc: devesh.sharma@broadcom.com, somnath.kotur@broadcom.com,
dledford@redhat.com, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org,
Himanshu Jha <himanshujha199640@gmail.com>
Subject: [PATCH] RDMA/bnxt_re: remove unnecessary call to memset
Date: Fri, 25 Aug 2017 21:41:02 +0530 [thread overview]
Message-ID: <1503677462-24238-1-git-send-email-himanshujha199640@gmail.com> (raw)
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>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index f0e01b3..fa6fbac 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -969,7 +969,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;
@@ -1016,7 +1015,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 */
--
2.7.4
next reply other threads:[~2017-08-25 16:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 16:11 Himanshu Jha [this message]
2017-08-27 8:16 ` [PATCH] RDMA/bnxt_re: remove unnecessary call to memset Yuval Shaia
2017-08-28 23:17 ` Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503677462-24238-1-git-send-email-himanshujha199640@gmail.com \
--to=himanshujha199640@gmail.com \
--cc=devesh.sharma@broadcom.com \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
--cc=somnath.kotur@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).