All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wan Jiabing <wanjiabing@vivo.com>
To: James Smart <james.smart@broadcom.com>,
	Ram Vegesna <ram.vegesna@broadcom.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Wan Jiabing <wanjiabing@vivo.com>,
	Daniel Wagner <dwagner@suse.de>,
	linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] scsi: elx: efct: remove unnecessary memset in efct_io
Date: Fri, 18 Mar 2022 22:52:20 +0800	[thread overview]
Message-ID: <20220318145230.1031-1-wanjiabing@vivo.com> (raw)

io->sgl is allocated by kzalloc(). The memory is set to zero.
It is unnecessary to call memset again.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 drivers/scsi/elx/efct/efct_io.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/elx/efct/efct_io.c b/drivers/scsi/elx/efct/efct_io.c
index c3247b951a76..c612f0a48839 100644
--- a/drivers/scsi/elx/efct/efct_io.c
+++ b/drivers/scsi/elx/efct/efct_io.c
@@ -62,7 +62,6 @@ efct_io_pool_create(struct efct *efct, u32 num_sgl)
 			return NULL;
 		}
 
-		memset(io->sgl, 0, sizeof(*io->sgl) * num_sgl);
 		io->sgl_allocated = num_sgl;
 		io->sgl_count = 0;
 
-- 
2.35.1


             reply	other threads:[~2022-03-18 14:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18 14:52 Wan Jiabing [this message]
2022-04-30  6:29 ` [PATCH] scsi: elx: efct: remove unnecessary memset in efct_io Christophe JAILLET
2022-04-30  6:29   ` Christophe JAILLET
2022-04-30  7:48   ` Finn Thain
2022-04-30  7:48     ` [cocci] " Finn Thain
2022-04-30  9:06     ` Christophe JAILLET
2022-04-30  9:06       ` [cocci] " Christophe JAILLET
2022-05-03  0:51 ` 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=20220318145230.1031-1-wanjiabing@vivo.com \
    --to=wanjiabing@vivo.com \
    --cc=dwagner@suse.de \
    --cc=james.smart@broadcom.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ram.vegesna@broadcom.com \
    --cc=target-devel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.