mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lee Duncan <lduncan@suse.com>
To: Wenchao Hao <haowenchao@huawei.com>,
	Chris Leech <cleech@redhat.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	Mike Christie <michael.christie@oracle.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Zhiqiang Liu <liuzhiqiang26@huawei.com>,
	Wu Bo <wubo40@huawei.com>,
	linfeilong@huawei.com
Subject: Re: [PATCH] scsi:libiscsi: remove unnecessary memset in iscsi_conn_setup
Date: Thu, 17 Mar 2022 08:34:55 -0700	[thread overview]
Message-ID: <bb6aefcf-92aa-ef41-27de-1e3e0b227761@suse.com> (raw)
In-Reply-To: <20220317150116.194140-1-haowenchao@huawei.com>

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@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;

Reviewed-by: Lee Duncan <lduncan@suse.com>


  parent reply	other threads:[~2022-03-17 15:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17 15:01 Wenchao Hao
2022-03-17 15:08 ` Mike Christie
2022-03-17 15:34 ` Lee Duncan [this message]
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

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=bb6aefcf-92aa-ef41-27de-1e3e0b227761@suse.com \
    --to=lduncan@suse.com \
    --cc=cleech@redhat.com \
    --cc=haowenchao@huawei.com \
    --cc=jejb@linux.ibm.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®