All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com,
	shivasharan.srikanteshwara@broadcom.com, jejb@linux.ibm.com,
	martin.petersen@oracle.com
Cc: megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org
Subject: [PATCH 4/5] scsi: megaraid_sas: remove unnecessary memset
Date: Wed, 14 Sep 2022 16:48:02 +0800	[thread overview]
Message-ID: <1663145283-4872-5-git-send-email-kanie@linux.alibaba.com> (raw)
In-Reply-To: <1663145283-4872-1-git-send-email-kanie@linux.alibaba.com>

Remove memset pd_list and ld_ids in megasas_get_device_list,
because they will be memset in megasas_host_device_list_query
or megasas_get_pd_list and megasas_ld_list_query.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 1ac33b1..b5503f9 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -5878,10 +5878,6 @@ static void megasas_setup_reply_map(struct megasas_instance *instance)
 static
 int megasas_get_device_list(struct megasas_instance *instance)
 {
-	memset(instance->pd_list, 0,
-	       (MEGASAS_MAX_PD * sizeof(struct megasas_pd_list)));
-	memset(instance->ld_ids, 0xff, MEGASAS_MAX_LD_IDS);
-
 	if (instance->enable_fw_dev_list) {
 		if (megasas_host_device_list_query(instance, true))
 			return FAILED;
-- 
1.8.3.1


  parent reply	other threads:[~2022-09-14  8:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  8:47 [PATCH 0/5] scsi: megaraid_sas: some bug fixes and cod cleanup Guixin Liu
2022-09-14  8:47 ` [PATCH 1/5] scsi: megaraid_sas: correct the parameter of scsi_device_lookup Guixin Liu
2022-09-28 10:50   ` Sumit Saxena
2022-09-14  8:48 ` [PATCH 2/5] scsi: megaraid_sas: correct an error message Guixin Liu
2022-09-28 10:52   ` Sumit Saxena
2022-09-14  8:48 ` [PATCH 3/5] scsi: megaraid_sas: simplify the megasas_update_device_list Guixin Liu
2022-09-28 11:04   ` Sumit Saxena
2022-09-14  8:48 ` Guixin Liu [this message]
2022-09-28 11:17   ` [PATCH 4/5] scsi: megaraid_sas: remove unnecessary memset Sumit Saxena
2022-09-14  8:48 ` [PATCH 5/5] scsi: megaraid_sas: move megasas_dbg_lvl init to megasas_init Guixin Liu
2022-09-28 11:19   ` Sumit Saxena
2022-09-19  2:35 ` [PATCH 0/5] scsi: megaraid_sas: some bug fixes and cod cleanup Guixin Liu
2022-09-22  8:49   ` Guixin Liu
2022-10-01  9:22 ` 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=1663145283-4872-5-git-send-email-kanie@linux.alibaba.com \
    --to=kanie@linux.alibaba.com \
    --cc=jejb@linux.ibm.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=megaraidlinux.pdl@broadcom.com \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=sumit.saxena@broadcom.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 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.