* [PATCH] RDMA/bnxt_re: Remove a redundant 'memset'
@ 2020-03-08 6:54 ` Christophe JAILLET
0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2020-03-08 6:54 UTC (permalink / raw)
To: selvin.xavier, devesh.sharma, somnath.kotur,
sriharsha.basavapatna, dledford, jgg
Cc: linux-rdma, linux-kernel, kernel-janitors, Christophe JAILLET
'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 here as well.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index ad3e524187e3..15494ca33092 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -2475,7 +2475,6 @@ static int bnxt_re_post_send_shadow_qp(struct bnxt_re_dev *rdev,
unsigned long flags;
spin_lock_irqsave(&qp->sq_lock, flags);
- memset(&wqe, 0, sizeof(wqe));
while (wr) {
/* House keeping */
memset(&wqe, 0, sizeof(wqe));
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] RDMA/bnxt_re: Remove a redundant 'memset'
@ 2020-03-08 6:54 ` Christophe JAILLET
0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2020-03-08 6:54 UTC (permalink / raw)
To: selvin.xavier, devesh.sharma, somnath.kotur,
sriharsha.basavapatna, dledford, jgg
Cc: linux-rdma, linux-kernel, kernel-janitors, Christophe JAILLET
'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 here as well.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index ad3e524187e3..15494ca33092 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -2475,7 +2475,6 @@ static int bnxt_re_post_send_shadow_qp(struct bnxt_re_dev *rdev,
unsigned long flags;
spin_lock_irqsave(&qp->sq_lock, flags);
- memset(&wqe, 0, sizeof(wqe));
while (wr) {
/* House keeping */
memset(&wqe, 0, sizeof(wqe));
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] RDMA/bnxt_re: Remove a redundant 'memset'
2020-03-08 6:54 ` Christophe JAILLET
@ 2020-03-10 17:34 ` Jason Gunthorpe
-1 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2020-03-10 17:34 UTC (permalink / raw)
To: Christophe JAILLET
Cc: selvin.xavier, devesh.sharma, somnath.kotur,
sriharsha.basavapatna, dledford, linux-rdma, linux-kernel,
kernel-janitors
On Sun, Mar 08, 2020 at 07:54:42AM +0100, Christophe JAILLET wrote:
> '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 here as well.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 -
> 1 file changed, 1 deletion(-)
Applied to for-next, I reworked it a bit:
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 47b0b50b71e70b..95f6d493d1b98d 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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] RDMA/bnxt_re: Remove a redundant 'memset'
@ 2020-03-10 17:34 ` Jason Gunthorpe
0 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2020-03-10 17:34 UTC (permalink / raw)
To: Christophe JAILLET
Cc: selvin.xavier, devesh.sharma, somnath.kotur,
sriharsha.basavapatna, dledford, linux-rdma, linux-kernel,
kernel-janitors
On Sun, Mar 08, 2020 at 07:54:42AM +0100, Christophe JAILLET wrote:
> '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 here as well.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 -
> 1 file changed, 1 deletion(-)
Applied to for-next, I reworked it a bit:
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 47b0b50b71e70b..95f6d493d1b98d 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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-10 17:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-08 6:54 [PATCH] RDMA/bnxt_re: Remove a redundant 'memset' Christophe JAILLET
2020-03-08 6:54 ` Christophe JAILLET
2020-03-10 17:34 ` Jason Gunthorpe
2020-03-10 17:34 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.