Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bean Huo and committed by
Martin K. Petersen
046c1e6f 8c9a51b0

+1 -6
+1 -4
drivers/scsi/ufs/ufshcd.c
··· 6970 6970 { 6971 6971 int ret; 6972 6972 6973 - if (!hba->is_init_prefetch) 6974 - ufshcd_init_icc_levels(hba); 6973 + ufshcd_init_icc_levels(hba); 6975 6974 6976 6975 /* Add required well known logical units to scsi mid layer */ 6977 6976 ret = ufshcd_scsi_add_wlus(hba); ··· 6996 6997 scsi_scan_host(hba->host); 6997 6998 pm_runtime_put_sync(hba->dev); 6998 6999 6999 - if (!hba->is_init_prefetch) 7000 - hba->is_init_prefetch = true; 7001 7000 out: 7002 7001 return ret; 7003 7002 }
-2
drivers/scsi/ufs/ufshcd.h
··· 501 501 * @intr_mask: Interrupt Mask Bits 502 502 * @ee_ctrl_mask: Exception event control mask 503 503 * @is_powered: flag to check if HBA is powered 504 - * @is_init_prefetch: flag to check if data was pre-fetched in initialization 505 504 * @init_prefetch_data: data pre-fetched during initialization 506 505 * @eh_work: Worker to handle UFS errors that require s/w attention 507 506 * @eeh_work: Worker to handle exception events ··· 651 652 u32 intr_mask; 652 653 u16 ee_ctrl_mask; 653 654 bool is_powered; 654 - bool is_init_prefetch; 655 655 struct ufs_init_prefetch init_prefetch_data; 656 656 657 657 /* Work Queues */