From: Mike Christie <michael.christie@oracle.com>
To: Wenchao Hao <haowenchao@huawei.com>,
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>
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 09:26:20 -0500 [thread overview]
Message-ID: <7ac617f1-0187-c296-bc5a-f3e26ef21488@oracle.com> (raw)
In-Reply-To: <44860f67-e626-411e-5ee6-9055ea2d5723@huawei.com>
On 3/16/22 4:02 AM, Wenchao Hao wrote:
> 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;
>>
>
The removal of the memset is ok, but you should resend the original
to the list because the formatting got messed up, and I think Martin
can't track this (The patch doesn't show up in patchwork/lore type of
things).
next prev parent reply other threads:[~2022-03-16 14:27 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
2022-03-16 14:26 ` Mike Christie [this message]
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=7ac617f1-0187-c296-bc5a-f3e26ef21488@oracle.com \
--to=michael.christie@oracle.com \
--cc=cleech@redhat.com \
--cc=haowenchao@huawei.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=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®