Commit 1c0810e7 authored by Keoseong Park's avatar Keoseong Park Committed by Martin K. Petersen

scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed()

Simplify if-else statement to return statement and remove code related to
CONFIG_SCSI_UFS_DWC that is not in use.

Link: https://lore.kernel.org/r/1891546521.01624860001810.JavaMail.epsvc@epcpadp3
Cc: Joao Pinto <jpinto@synopsys.com>
Reviewed-by: default avatarBean Huo <beanhuo@micron.com>
Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarKeoseong Park <keosung.park@samsung.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 2734d6c1
...@@ -893,16 +893,8 @@ static inline bool ufshcd_is_rpm_autosuspend_allowed(struct ufs_hba *hba) ...@@ -893,16 +893,8 @@ static inline bool ufshcd_is_rpm_autosuspend_allowed(struct ufs_hba *hba)
static inline bool ufshcd_is_intr_aggr_allowed(struct ufs_hba *hba) static inline bool ufshcd_is_intr_aggr_allowed(struct ufs_hba *hba)
{ {
/* DWC UFS Core has the Interrupt aggregation feature but is not detectable*/ return (hba->caps & UFSHCD_CAP_INTR_AGGR) &&
#ifndef CONFIG_SCSI_UFS_DWC !(hba->quirks & UFSHCD_QUIRK_BROKEN_INTR_AGGR);
if ((hba->caps & UFSHCD_CAP_INTR_AGGR) &&
!(hba->quirks & UFSHCD_QUIRK_BROKEN_INTR_AGGR))
return true;
else
return false;
#else
return true;
#endif
} }
static inline bool ufshcd_can_aggressive_pc(struct ufs_hba *hba) static inline bool ufshcd_can_aggressive_pc(struct ufs_hba *hba)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment