* [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed()
[not found] <CGME20210628055801epcms2p449fdffa1a6c801497d7e65bae2896b79@epcms2p4>
@ 2021-06-28 5:58 ` Keoseong Park
2021-06-28 6:32 ` Bean Huo
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Keoseong Park @ 2021-06-28 5:58 UTC (permalink / raw)
To: ALIM AKHTAR, avri.altman, jejb, martin.petersen, stanley.chu,
cang, beanhuo, adrian.hunter, Kiwoong Kim, satyat, asutoshd,
bvanassche, linux-scsi, linux-kernel, jpinto, joe
Simplify if else statement to return statement,
and remove code related to CONFIG_SCSI_UFS_DWC that is not in use.
v1 -> v2
Remove code related to CONFIG_SCSI_UFS_DWC that is not in use.
Cc: Joao Pinto <jpinto@synopsys.com>
Signed-off-by: Keoseong Park <keosung.park@samsung.com>
---
drivers/scsi/ufs/ufshcd.h | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index c98d540ac044..c9faca237290 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -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)
{
-/* 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))
- 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)
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed()
2021-06-28 5:58 ` [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed() Keoseong Park
@ 2021-06-28 6:32 ` Bean Huo
2021-06-28 16:56 ` Bart Van Assche
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Bean Huo @ 2021-06-28 6:32 UTC (permalink / raw)
To: keosung.park, ALIM AKHTAR, avri.altman, jejb, martin.petersen,
stanley.chu, cang, beanhuo, adrian.hunter, Kiwoong Kim, satyat,
asutoshd, bvanassche, linux-scsi, linux-kernel, jpinto, joe
On Mon, 2021-06-28 at 14:58 +0900, Keoseong Park wrote:
> Simplify if else statement to return statement,
>
> and remove code related to CONFIG_SCSI_UFS_DWC that is not in use.
>
>
>
> v1 -> v2
>
> Remove code related to CONFIG_SCSI_UFS_DWC that is not in use.
>
>
>
> Cc: Joao Pinto <jpinto@synopsys.com>
>
> Signed-off-by: Keoseong Park <keosung.park@samsung.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed()
2021-06-28 5:58 ` [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed() Keoseong Park
2021-06-28 6:32 ` Bean Huo
@ 2021-06-28 16:56 ` Bart Van Assche
2021-07-18 21:52 ` Martin K. Petersen
2021-07-24 2:13 ` Martin K. Petersen
3 siblings, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2021-06-28 16:56 UTC (permalink / raw)
To: keosung.park, ALIM AKHTAR, avri.altman, jejb, martin.petersen,
stanley.chu, cang, beanhuo, adrian.hunter, Kiwoong Kim, satyat,
asutoshd, linux-scsi, linux-kernel, jpinto, joe
On 6/27/21 10:58 PM, Keoseong Park wrote:
> Simplify if else statement to return statement,
> and remove code related to CONFIG_SCSI_UFS_DWC that is not in use.
>
> v1 -> v2
> Remove code related to CONFIG_SCSI_UFS_DWC that is not in use.
>
> Cc: Joao Pinto <jpinto@synopsys.com>
> Signed-off-by: Keoseong Park <keosung.park@samsung.com>
> ---
> drivers/scsi/ufs/ufshcd.h | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
> index c98d540ac044..c9faca237290 100644
> --- a/drivers/scsi/ufs/ufshcd.h
> +++ b/drivers/scsi/ufs/ufshcd.h
> @@ -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)
> {
> -/* 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))
> - return true;
> - else
> - return false;
> -#else
> -return true;
> -#endif
> + return (hba->caps & UFSHCD_CAP_INTR_AGGR) &&
> + !(hba->quirks & UFSHCD_QUIRK_BROKEN_INTR_AGGR);
> }
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed()
2021-06-28 5:58 ` [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed() Keoseong Park
2021-06-28 6:32 ` Bean Huo
2021-06-28 16:56 ` Bart Van Assche
@ 2021-07-18 21:52 ` Martin K. Petersen
2021-07-24 2:13 ` Martin K. Petersen
3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-07-18 21:52 UTC (permalink / raw)
To: Keoseong Park
Cc: ALIM AKHTAR, avri.altman, jejb, martin.petersen, stanley.chu,
cang, beanhuo, adrian.hunter, Kiwoong Kim, satyat, asutoshd,
bvanassche, linux-scsi, linux-kernel, jpinto, joe
Keoseong,
> Simplify if else statement to return statement, and remove code
> related to CONFIG_SCSI_UFS_DWC that is not in use.
Applied to 5.15/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed()
2021-06-28 5:58 ` [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed() Keoseong Park
` (2 preceding siblings ...)
2021-07-18 21:52 ` Martin K. Petersen
@ 2021-07-24 2:13 ` Martin K. Petersen
3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-07-24 2:13 UTC (permalink / raw)
To: avri.altman, adrian.hunter, bvanassche, jpinto, stanley.chu,
satyat, jejb, Keoseong Park, linux-scsi, linux-kernel,
ALIM AKHTAR, asutoshd, joe, cang, Kiwoong Kim, beanhuo
Cc: Martin K . Petersen
On Mon, 28 Jun 2021 14:58:01 +0900, Keoseong Park wrote:
> Simplify if else statement to return statement,
> and remove code related to CONFIG_SCSI_UFS_DWC that is not in use.
>
> v1 -> v2
> Remove code related to CONFIG_SCSI_UFS_DWC that is not in use.
Applied to 5.15/scsi-queue, thanks!
[1/1] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed()
https://git.kernel.org/mkp/scsi/c/1c0810e79cb3
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-24 2:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20210628055801epcms2p449fdffa1a6c801497d7e65bae2896b79@epcms2p4>
2021-06-28 5:58 ` [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed() Keoseong Park
2021-06-28 6:32 ` Bean Huo
2021-06-28 16:56 ` Bart Van Assche
2021-07-18 21:52 ` Martin K. Petersen
2021-07-24 2:13 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.