mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi:libiscsi: remove unnecessary memset in iscsi_conn_setup
@ 2022-03-17 15:01 Wenchao Hao
  2022-03-17 15:08 ` Mike Christie
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wenchao Hao @ 2022-03-17 15:01 UTC (permalink / raw)
  To: Lee Duncan, Chris Leech, James E . J . Bottomley, Mike Christie,
	Martin K . Petersen, open-iscsi, linux-scsi, linux-kernel
  Cc: Zhiqiang Liu, Wu Bo, linfeilong, Wenchao Hao

iscsi_cls_conn is alloced by kzalloc(), the whole iscsi_cls_conn is
zero filled already including the dd_data. So it is unnecessary to
call memset again.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Reviewed-by: Wu Bo <wubo40@huawei.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
---
 drivers/scsi/libiscsi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index d09926e6c8a8..cf4211c6500d 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -3045,7 +3045,6 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, int dd_size,
 	if (!cls_conn)
 		return NULL;
 	conn = cls_conn->dd_data;
-	memset(conn, 0, sizeof(*conn) + dd_size);
 
 	conn->dd_data = cls_conn->dd_data + sizeof(*conn);
 	conn->session = session;
-- 
2.32.0


^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <20220316220936.191013-1-haowenchao@huawei.com>]

end of thread, other threads:[~2022-03-30  3:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 15:01 [PATCH] scsi:libiscsi: remove unnecessary memset in iscsi_conn_setup Wenchao Hao
2022-03-17 15:08 ` Mike Christie
2022-03-17 15:34 ` Lee Duncan
2022-03-30  3:02 ` Martin K. Petersen
     [not found] <20220316220936.191013-1-haowenchao@huawei.com>
2022-03-16  9:02 ` Wenchao Hao
2022-03-16 14:26   ` Mike Christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®