scsi: ufs: Add indent for code alignment
A message that is not in the archive (sent off-list or not yet received): CGME20210610040731epcms2p7533bc62d13b82a0e86590f30ac4b6c30@epcms2p7
PATCH 1/1 scsi: ufs: Add indent for code alignment
Add indentation to return statement.
--- drivers/scsi/ufs/ufshcd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/ufshcd.h +1 -1
@@ -903,7 +903,7 @@ static inline bool ufshcd_is_intr_aggr_allowed(struct ufs_hba *hba) else return false;#else -return true; +return true;#endif }
Signature · 1 line
2.17.1
Quoted 1 line · Keoseong Park
Add indentation to return statement.
[]
drivers/scsi/ufs/ufshcd.h
Quoted 1 line
drivers/scsi/ufs/ufshcd.h +0
-0
[]
Quoted 9 lines
drivers/scsi/ufs/ufshcd.h +0
-0@@ -903,7 +903,7 @@ static inline bool ufshcd_is_intr_aggr_allowed(struct ufs_hba *hba)else
return false;
#elsedrivers/scsi/ufs/ufshcd.h +1
-1-return true; +return true;#endif
}
Perhaps a little refactoring instead:
--- drivers/scsi/ufs/ufshcd.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/scsi/ufs/ufshcd.h +4 -8
@@ -894,15 +894,11 @@ static inline bool ufshcd_is_rpm_autosuspend_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*/ -#ifndef CONFIG_SCSI_UFS_DWC -if ((hba->caps &UFSHCD_CAP_INTR_AGGR ) && - !(hba->quirks &UFSHCD_QUIRK_BROKEN_INTR_AGGR )) +if (IS_ENABLED (CONFIG_SCSI_UFS_DWC ))return true; -else -return false; -#else -return true; -#endif + +return (hba->caps &UFSHCD_CAP_INTR_AGGR ) && + !(hba->quirks &UFSHCD_QUIRK_BROKEN_INTR_AGGR ); }static inline bool ufshcd_can_aggressive_pc (struct ufs_hba *hba)
Quoted 35 lines · Keoseong Park
Quoted 1 line
Add indentation to return statement.
[]
drivers/scsi/ufs/ufshcd.h
Quoted 1 line
drivers/scsi/ufs/ufshcd.h +0
-0[]
drivers/scsi/ufs/ufshcd.h static inline bool ufshcd_is_intr_aggr_allowed(struct ufs_hba *hba) · line 909
Quoted 9 lines
drivers/scsi/ufs/ufshcd.h +1
-1@@ -903,7 +903,7 @@ static inline bool ufshcd_is_intr_aggr_allowed(struct ufs_hba *hba) else return false;#else -return true; +return true;#endif }Perhaps a little refactoring instead:
---drivers/scsi/ufs/ufshcd.h| 12 ++++--------1 file changed, 4 insertions(+), 8 deletions(-)drivers/scsi/ufs/ufshcd.h +1
-4@@ -894,15 +894,11 @@ static inline bool ufshcd_is_rpm_autosuspend_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*/ -#ifndef CONFIG_SCSI_UFS_DWC -if ((hba->caps &UFSHCD_CAP_INTR_AGGR ) && - !(hba->quirks &UFSHCD_QUIRK_BROKEN_INTR_AGGR )) +if (IS_ENABLED (CONFIG_SCSI_UFS_DWC ))return true; -else
drivers/scsi/ufs/ufshcd.h static inline bool ufshcd_is_rpm_autosuspend_allowed(struct ufs_hba *hba) · line 904
Quoted 10 lines
drivers/scsi/ufs/ufshcd.h +3
-4-return false; -#else -return true; -#endif + +return (hba->caps &UFSHCD_CAP_INTR_AGGR ) && + !(hba->quirks &UFSHCD_QUIRK_BROKEN_INTR_AGGR ); }static inline bool ufshcd_can_aggressive_pc (struct ufs_hba *hba)
Hello Joe,
Thanks for your advice.
As you mentioned, refactoring looks good.
However, since the content does not match the title, can I submit a patch with a new title?
Best Regards,
Keoseong
Quoted 46 lines · Keoseong Park
Quoted 46 lines · Keoseong Park
Quoted 1 line
Add indentation to return statement.
[]
drivers/scsi/ufs/ufshcd.h
Quoted 1 line
drivers/scsi/ufs/ufshcd.h +0
-0[]
Quoted 10 lines
drivers/scsi/ufs/ufshcd.h +0
-0@@ -903,7 +903,7 @@ static inline bool ufshcd_is_intr_aggr_allowed(struct ufs_hba *hba)else
return false;
#elsedrivers/scsi/ufs/ufshcd.h +1
-1-return true; +return true;#endif
}Perhaps a little refactoring instead:
---drivers/scsi/ufs/ufshcd.h| 12 ++++--------1 file changed, 4 insertions(+), 8 deletions(-)drivers/scsi/ufs/ufshcd.h +0
-0@@ -894,15 +894,11 @@ static inline bool ufshcd_is_rpm_autosuspend_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*/
drivers/scsi/ufs/ufshcd.h +1
-3-#ifndef CONFIG_SCSI_UFS_DWC -if ((hba->caps &UFSHCD_CAP_INTR_AGGR ) && - !(hba->quirks &UFSHCD_QUIRK_BROKEN_INTR_AGGR )) +if (IS_ENABLED (CONFIG_SCSI_UFS_DWC ))return true;drivers/scsi/ufs/ufshcd.h +3
-5- else - return false; -#else -return true; -#endif + +return (hba->caps &UFSHCD_CAP_INTR_AGGR ) && + !(hba->quirks &UFSHCD_QUIRK_BROKEN_INTR_AGGR );}
Quoted 8 lines
Quoted 2 lines
static inline bool
ufshcd_can_aggressive_pc(struct ufs_hba *hba)Hello Joe,
Thanks for your advice.
As you mentioned, refactoring looks good.
However, since the content does not match the title, can I submit a patch with a new title?
Yes of course.