diff mbox series

[v3,1/5] scsi: ufs: Remove unnecessary memset for dev_info

Message ID 20200516174615.15445-2-stanley.chu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series scsi: ufs: Fix WriteBooster and cleanup UFS driver | expand

Commit Message

Stanley Chu May 16, 2020, 5:46 p.m. UTC
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@mediatek.com>
---
 drivers/scsi/ufs/ufshcd.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Avri Altman May 17, 2020, 6:11 a.m. UTC | #1
> 
> 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@mediatek.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index aca50ed39844..4a3f3648c64f 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -7262,9 +7262,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);