From: Wenchao Hao <haowenchao@huawei.com>
To: Lee Duncan <lduncan@suse.com>, Chris Leech <cleech@redhat.com>,
"James E . J . Bottomley" <jejb@linux.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Mike Christie <michael.christie@oracle.com>
Cc: Wu Bo <wubo40@huawei.com>, <open-iscsi@googlegroups.com>,
<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Zhiqiang Liu <liuzhiqiang26@huawei.com>,
Feilong Lin <linfeilong@huawei.com>
Subject: Re: [PATCH] scsi:libiscsi: remove unnecessary memset in iscsi_conn_setup
Date: Wed, 16 Mar 2022 17:02:58 +0800 [thread overview]
Message-ID: <44860f67-e626-411e-5ee6-9055ea2d5723@huawei.com> (raw)
In-Reply-To: <20220316220936.191013-1-haowenchao@huawei.com>
cc open-iscsi@googlegroups.com linux-scsi@vger.kernel.org
On 2022/3/17 6:09, 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@huawei.com>
> Reviewed-by: Wu Bo <wubo40@huawei.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;
>
next parent reply other threads:[~2022-03-16 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220316220936.191013-1-haowenchao@huawei.com>
2022-03-16 9:02 ` Wenchao Hao [this message]
2022-03-16 14:26 ` Mike Christie
2022-03-17 15:01 Wenchao Hao
2022-03-17 15:08 ` Mike Christie
2022-03-17 15:34 ` Lee Duncan
2022-03-30 3:02 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44860f67-e626-411e-5ee6-9055ea2d5723@huawei.com \
--to=haowenchao@huawei.com \
--cc=cleech@redhat.com \
--cc=jejb@linux.ibm.com \
--cc=lduncan@suse.com \
--cc=linfeilong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=liuzhiqiang26@huawei.com \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=open-iscsi@googlegroups.com \
--cc=wubo40@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®