ufs: Remove usfhcd_is_*_pm() macros
PATCH 1/1 ufs: Remove usfhcd_is_*_pm() macros
Remove these macros to make the UFS driver source code easier to read. These macros were introduced by commit 57d104c153d3 ("ufs: add UFS power management support").
Cc Can Guo <[email protected]>
Cc Alim Akhtar <[email protected]>
Cc Avri Altman <[email protected]>
Cc Stanley Chu <[email protected]>
Cc Bean Huo <[email protected]>
Cc Adrian Hunter <[email protected]>
Signed-off-by Bart Van Assche <[email protected]>
--- drivers/scsi/ufs/ufs-hisi.c | 2 +- drivers/scsi/ufs/ufshcd.c | 8 ++++---- drivers/scsi/ufs/ufshcd.h | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-)
drivers/scsi/ufs/ufs-hisi.c +1 -1
@@ -400,7 +400,7 @@ static int ufs_hisi_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op) {struct ufs_hisi_host *host =ufshcd_get_variant (hba); -if (ufshcd_is_runtime_pm (pm_op)) +if (pm_op ==UFS_RUNTIME_PM )return 0 ;if (host->in_suspend) {
drivers/scsi/ufs/ufshcd.c +4 -4
@@ -8668,8 +8668,8 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)enum uic_link_state req_link_state; hba->pm_op_in_progress =1 ; -if (!ufshcd_is_shutdown_pm (pm_op)) { - pm_lvl =ufshcd_is_runtime_pm (pm_op) ? +if (pm_op !=UFS_SHUTDOWN_PM ) { + pm_lvl = pm_op ==UFS_RUNTIME_PM ? hba->rpm_lvl : hba->spm_lvl; req_dev_pwr_mode =ufs_get_pm_lvl_to_dev_pwr_mode (pm_lvl); req_link_state =ufs_get_pm_lvl_to_link_pwr_state (pm_lvl);
@@ -8703,7 +8703,7 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op) goto enable_gating; } -if (ufshcd_is_runtime_pm (pm_op)) { +if (pm_op ==UFS_RUNTIME_PM ) {if (ufshcd_can_autobkops_during_suspend (hba)) {/* * The device is idle with no requests in the queue,
@@ -8733,7 +8733,7 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)flush_work (&hba->eeh_work);if (req_dev_pwr_mode != hba->curr_dev_pwr_mode) { -if (!ufshcd_is_runtime_pm (pm_op)) +if (pm_op !=UFS_RUNTIME_PM )/* ensure that bkops is disabled */ ufshcd_disable_auto_bkops (hba);
drivers/scsi/ufs/ufshcd.h +0 -4
@@ -106,10 +106,6 @@ enum ufs_pm_op { UFS_SHUTDOWN_PM, }; -#define ufshcd_is_runtime_pm (op) ((op) == UFS_RUNTIME_PM) -#define ufshcd_is_system_pm (op) ((op) == UFS_SYSTEM_PM) -#define ufshcd_is_shutdown_pm (op) ((op) == UFS_SHUTDOWN_PM) -/* Host <-> Device UniPro Link state */ enum uic_link_state {UIC_LINK_OFF_STATE =0 ,/* Link powered down or disabled */
Martin K. Petersen
AppliedBart,
Quoted 3 lines
Remove these macros to make the UFS driver source code easier to read. These macros were introduced by commit
57d104c153d3("ufs: add UFS power management support").
Applied to 5.14/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 3 lines · Bart Van Assche
Remove these macros to make the UFS driver source code easier to read. These macros were introduced by commit
57d104c153d3("ufs: add UFS power management support").
Applied to 5.14/scsi-queue, thanks!
[1/1] ufs: Remove usfhcd_is_*_pm() macros
https://git.kernel.org/mkp/scsi/c/4c6cb9ed63df
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering