linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] scsi: qla2xxx: Remove useless set memory to zero use memset()
@ 2019-03-23 13:27 Yue Haibing
  2019-04-04  3:41 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Yue Haibing @ 2019-03-23 13:27 UTC (permalink / raw)
  To: qla2xxx-upstream, jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

The memory return by kzalloc() has already be set to zero, so
remove useless memset(0).

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 3b81a2a..90da4b9 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -8852,7 +8852,6 @@ struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *vha, int qos,
 			    "Failed to allocate memory for queue pair.\n");
 			return NULL;
 		}
-		memset(qpair, 0, sizeof(struct qla_qpair));
 
 		qpair->hw = vha->hw;
 		qpair->vha = vha;
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] scsi: qla2xxx: Remove useless set memory to zero use memset()
  2019-03-23 13:27 [PATCH -next] scsi: qla2xxx: Remove useless set memory to zero use memset() Yue Haibing
@ 2019-04-04  3:41 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2019-04-04  3:41 UTC (permalink / raw)
  To: Yue Haibing
  Cc: qla2xxx-upstream, jejb, martin.petersen, linux-kernel, linux-scsi


Yue,

> The memory return by kzalloc() has already be set to zero, so remove
> useless memset(0).

Applied to 5.2/scsi-queue, thanks.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-04  3:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-23 13:27 [PATCH -next] scsi: qla2xxx: Remove useless set memory to zero use memset() Yue Haibing
2019-04-04  3:41 ` Martin K. Petersen

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).