diff mbox series

[4/5] scsi: megaraid_sas: remove unnecessary memset

Message ID 1663145283-4872-5-git-send-email-kanie@linux.alibaba.com (mailing list archive)
State Accepted
Headers show
Series scsi: megaraid_sas: some bug fixes and cod cleanup | expand

Commit Message

Guixin Liu Sept. 14, 2022, 8:48 a.m. UTC
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(-)

Comments

Sumit Saxena Sept. 28, 2022, 11:17 a.m. UTC | #1
On Wed, Sep 14, 2022 at 2:18 PM Guixin Liu <kanie@linux.alibaba.com> wrote:
>
> 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>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
diff mbox series

Patch

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;