summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBean Huo <beanhuo@micron.com>2020-01-20 14:08:18 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-01-20 19:16:10 -0500
commit046c1e6f2707890a2e64f3f15388ca389aaebcbf (patch)
tree5a5bead1f27bd342b8f9d81df0eb2b4a8c467ccc /drivers
parent8c9a51b00743163862325dfc15ece4642821919a (diff)
scsi: ufs: Delete is_init_prefetch from struct ufs_hba
Without variable is_init_prefetch, the current logic can guarantee ufshcd_init_icc_levels() will execute only once, delete it now. Link: https://lore.kernel.org/r/20200120130820.1737-7-huobean@gmail.com Reviewed-by: Asutosh Das <asutoshd@codeaurora.org> Signed-off-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ufs/ufshcd.c5
-rw-r--r--drivers/scsi/ufs/ufshcd.h2
2 files changed, 1 insertions, 6 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index ba83eda2ea77..80e2261fc144 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6970,8 +6970,7 @@ static int ufshcd_add_lus(struct ufs_hba *hba)
{
int ret;
- if (!hba->is_init_prefetch)
- ufshcd_init_icc_levels(hba);
+ ufshcd_init_icc_levels(hba);
/* Add required well known logical units to scsi mid layer */
ret = ufshcd_scsi_add_wlus(hba);
@@ -6997,8 +6996,6 @@ static int ufshcd_add_lus(struct ufs_hba *hba)
scsi_scan_host(hba->host);
pm_runtime_put_sync(hba->dev);
- if (!hba->is_init_prefetch)
- hba->is_init_prefetch = true;
out:
return ret;
}
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index 961d6737cd15..2ae6c7c8528c 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -501,7 +501,6 @@ struct ufs_stats {
* @intr_mask: Interrupt Mask Bits
* @ee_ctrl_mask: Exception event control mask
* @is_powered: flag to check if HBA is powered
- * @is_init_prefetch: flag to check if data was pre-fetched in initialization
* @init_prefetch_data: data pre-fetched during initialization
* @eh_work: Worker to handle UFS errors that require s/w attention
* @eeh_work: Worker to handle exception events
@@ -652,7 +651,6 @@ struct ufs_hba {
u32 intr_mask;
u16 ee_ctrl_mask;
bool is_powered;
- bool is_init_prefetch;
struct ufs_init_prefetch init_prefetch_data;
/* Work Queues */