From ec794a662365ff50aada171dfba8fad82ad28dfa Mon Sep 17 00:00:00 2001 From: Stanley Chu Date: Fri, 22 May 2020 16:32:09 +0800 Subject: [PATCH] BACKPORT: FROMGIT: 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. Link: https://lore.kernel.org/r/20200522083212.4008-2-stanley.chu@mediatek.com Reviewed-by: Avri Altman Reviewed-by: Asutosh Das Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen Bug: 158450168 (cherry picked from commit 3a66ae512b09971410abf9f1d546944c07b852ec https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git 5.8/scsi-queue) Change-Id: Idb4776fb166018e1d61892a8d58b5c135738c1c7 [can: Resolved minor conflicts] Signed-off-by: Can Guo --- 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 3b1e6ac73677..70779d98bf79 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7149,11 +7149,8 @@ static int ufshcd_device_params_init(struct ufs_hba *hba) __func__, ret); goto out; } - ufs_fixup_device_setup(hba); - /* Clear any previous UFS device information */ - memset(&hba->dev_info, 0, sizeof(hba->dev_info)); if (!ufshcd_query_flag_retry(hba, UPIU_QUERY_OPCODE_READ_FLAG, QUERY_FLAG_IDN_PWR_ON_WPE, &flag)) hba->dev_info.f_power_on_wp_en = flag;