* [PATCH] scsi: ufs: Add indent for code alignment [not found] <CGME20210610040731epcms2p7533bc62d13b82a0e86590f30ac4b6c30@epcms2p7> @ 2021-06-10 4:07 ` Keoseong Park 2021-06-10 4:54 ` Joe Perches [not found] ` <CGME20210610040731epcms2p7533bc62d13b82a0e86590f30ac4b6c30@epcms2p1> 0 siblings, 2 replies; 4+ messages in thread From: Keoseong Park @ 2021-06-10 4:07 UTC (permalink / raw) To: ALIM AKHTAR, avri.altman, jejb, martin.petersen, stanley.chu, cang, beanhuo, adrian.hunter, asutoshd, satyat, bvanassche, linux-scsi, linux-kernel Add indentation to return statement. Signed-off-by: Keoseong Park <keosung.park@samsung.com> --- drivers/scsi/ufs/ufshcd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 8b1d0dad0764..97dfc6e94390 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -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 } -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: Add indent for code alignment 2021-06-10 4:07 ` [PATCH] scsi: ufs: Add indent for code alignment Keoseong Park @ 2021-06-10 4:54 ` Joe Perches [not found] ` <CGME20210610040731epcms2p7533bc62d13b82a0e86590f30ac4b6c30@epcms2p1> 1 sibling, 0 replies; 4+ messages in thread From: Joe Perches @ 2021-06-10 4:54 UTC (permalink / raw) To: keosung.park, ALIM AKHTAR, avri.altman, jejb, martin.petersen, stanley.chu, cang, beanhuo, adrian.hunter, asutoshd, satyat, bvanassche, linux-scsi, linux-kernel On Thu, 2021-06-10 at 13:07 +0900, Keoseong Park wrote: > Add indentation to return statement. [] > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h [] > @@ -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(-) diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index c98d540ac044d..ed89839476b3b 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -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) ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <CGME20210610040731epcms2p7533bc62d13b82a0e86590f30ac4b6c30@epcms2p1>]
* RE: Re: [PATCH] scsi: ufs: Add indent for code alignment [not found] ` <CGME20210610040731epcms2p7533bc62d13b82a0e86590f30ac4b6c30@epcms2p1> @ 2021-06-17 1:28 ` Keoseong Park 2021-06-17 3:35 ` Joe Perches 0 siblings, 1 reply; 4+ messages in thread From: Keoseong Park @ 2021-06-17 1:28 UTC (permalink / raw) To: Joe Perches, Keoseong Park, ALIM AKHTAR, avri.altman, jejb, martin.petersen, stanley.chu, cang, beanhuo, adrian.hunter, asutoshd, satyat, bvanassche, linux-scsi, linux-kernel >On Thu, 2021-06-10 at 13:07 +0900, Keoseong Park wrote: >> Add indentation to return statement. >[] >> diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h >[] >> @@ -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(-) > >diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h >index c98d540ac044d..ed89839476b3b 100644 >--- a/drivers/scsi/ufs/ufshcd.h >+++ b/drivers/scsi/ufs/ufshcd.h >@@ -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) > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [PATCH] scsi: ufs: Add indent for code alignment 2021-06-17 1:28 ` Keoseong Park @ 2021-06-17 3:35 ` Joe Perches 0 siblings, 0 replies; 4+ messages in thread From: Joe Perches @ 2021-06-17 3:35 UTC (permalink / raw) To: keosung.park, ALIM AKHTAR, avri.altman, jejb, martin.petersen, stanley.chu, cang, beanhuo, adrian.hunter, asutoshd, satyat, bvanassche, linux-scsi, linux-kernel On Thu, 2021-06-17 at 10:28 +0900, Keoseong Park wrote: > > On Thu, 2021-06-10 at 13:07 +0900, Keoseong Park wrote: > > > Add indentation to return statement. > > [] > > > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h > > [] > > > @@ -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(-) > > > > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h > > index c98d540ac044d..ed89839476b3b 100644 > > --- a/drivers/scsi/ufs/ufshcd.h > > +++ b/drivers/scsi/ufs/ufshcd.h > > @@ -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) > > > > 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-17 20:56 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20210610040731epcms2p7533bc62d13b82a0e86590f30ac4b6c30@epcms2p7> 2021-06-10 4:07 ` [PATCH] scsi: ufs: Add indent for code alignment Keoseong Park 2021-06-10 4:54 ` Joe Perches [not found] ` <CGME20210610040731epcms2p7533bc62d13b82a0e86590f30ac4b6c30@epcms2p1> 2021-06-17 1:28 ` Keoseong Park 2021-06-17 3:35 ` Joe Perches
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).