[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bb6aefcf-92aa-ef41-27de-1e3e0b227761@suse.com>
Date: Thu, 17 Mar 2022 08:34:55 -0700
From: Lee Duncan <lduncan@...e.com>
To: Wenchao Hao <haowenchao@...wei.com>,
Chris Leech <cleech@...hat.com>,
"James E . J . Bottomley" <jejb@...ux.ibm.com>,
Mike Christie <michael.christie@...cle.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
open-iscsi@...glegroups.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Zhiqiang Liu <liuzhiqiang26@...wei.com>, Wu Bo <wubo40@...wei.com>,
linfeilong@...wei.com
Subject: Re: [PATCH] scsi:libiscsi: remove unnecessary memset in
iscsi_conn_setup
On 3/17/22 08:01, Wenchao Hao wrote:
> 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@...wei.com>
> Reviewed-by: Wu Bo <wubo40@...wei.com>
> Reviewed-by: Lee Duncan <lduncan@...e.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;
Reviewed-by: Lee Duncan <lduncan@...e.com>
Powered by blists - more mailing lists