* [PATCH] RDMA/bnxt_re: remove unnecessary call to memset
@ 2017-08-25 16:11 Himanshu Jha
2017-08-27 8:16 ` Yuval Shaia
2017-08-28 23:17 ` Doug Ledford
0 siblings, 2 replies; 3+ messages in thread
From: Himanshu Jha @ 2017-08-25 16:11 UTC (permalink / raw)
To: selvin.xavier
Cc: devesh.sharma, somnath.kotur, dledford, linux-rdma, linux-kernel,
Himanshu Jha
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/bnxt_re: remove unnecessary call to memset
2017-08-25 16:11 [PATCH] RDMA/bnxt_re: remove unnecessary call to memset Himanshu Jha
@ 2017-08-27 8:16 ` Yuval Shaia
2017-08-28 23:17 ` Doug Ledford
1 sibling, 0 replies; 3+ messages in thread
From: Yuval Shaia @ 2017-08-27 8:16 UTC (permalink / raw)
To: Himanshu Jha
Cc: selvin.xavier, devesh.sharma, somnath.kotur, dledford,
linux-rdma, linux-kernel
On Fri, Aug 25, 2017 at 09:41:02PM +0530, Himanshu Jha wrote:
> 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
FWIW
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/bnxt_re: remove unnecessary call to memset
2017-08-25 16:11 [PATCH] RDMA/bnxt_re: remove unnecessary call to memset Himanshu Jha
2017-08-27 8:16 ` Yuval Shaia
@ 2017-08-28 23:17 ` Doug Ledford
1 sibling, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2017-08-28 23:17 UTC (permalink / raw)
To: Himanshu Jha, selvin.xavier
Cc: devesh.sharma, somnath.kotur, linux-rdma, linux-kernel
On Fri, 2017-08-25 at 21:41 +0530, Himanshu Jha wrote:
> 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>
Thanks, applied.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-28 23:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 16:11 [PATCH] RDMA/bnxt_re: remove unnecessary call to memset Himanshu Jha
2017-08-27 8:16 ` Yuval Shaia
2017-08-28 23:17 ` Doug Ledford
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).