[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200522083212.4008-2-stanley.chu@mediatek.com>
Date: Fri, 22 May 2020 16:32:09 +0800
From: Stanley Chu <stanley.chu@...iatek.com>
To: <linux-scsi@...r.kernel.org>, <martin.petersen@...cle.com>,
<avri.altman@....com>, <alim.akhtar@...sung.com>,
<jejb@...ux.ibm.com>, <asutoshd@...eaurora.org>
CC: <beanhuo@...ron.com>, <cang@...eaurora.org>,
<matthias.bgg@...il.com>, <bvanassche@....org>,
<linux-mediatek@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
<Virtual_Global_UFS_Upstream@...iatek.com>,
Stanley Chu <stanley.chu@...iatek.com>
Subject: [PATCH v4 1/4] scsi: ufs: Remove unnecessary memset for dev_info
The whole UFS host instance has been zero-initialized by
scsi_host_alloc(), thus UFS driver does not need to clear
"dev_info" member specifically in ufshcd_device_params_init().
Simply remove the unnecessary code.
Signed-off-by: Stanley Chu <stanley.chu@...iatek.com>
Reviewed-by: Avri Altman <avri.altman@....com>
---
drivers/scsi/ufs/ufshcd.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index c3389c9a4f29..9e55c524f330 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -7267,9 +7267,6 @@ static int ufshcd_device_params_init(struct ufs_hba *hba)
bool flag;
int ret;
- /* Clear any previous UFS device information */
- memset(&hba->dev_info, 0, sizeof(hba->dev_info));
-
/* Init check for device descriptor sizes */
ufshcd_init_desc_sizes(hba);
--
2.18.0
Powered by blists - more mailing lists