[PATCH v12 15/24] scsi: ufs: mediatek: Remove mediatek,ufs-broken-rtc property

sashiko-bot at kernel.org sashiko-bot at kernel.org
Mon Sep 14 05:52:10 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch removes the only setter of the UFSHCD_QUIRK_MCQ_BROKEN_RTC quirk, leaving dead code in the UFS core.
--

commit 82a04ad4bc4aa7f179dd5c4350001c1dceff6a56
Author: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>

scsi: ufs: mediatek: Remove mediatek,ufs-broken-rtc property

This commit removes the undocumented mediatek,ufs-broken-rtc property and
its capability wrapper. If the quirk is needed for specific MediaTek SoCs, it
is expected to be handled per-compatible instead.

> diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
> index 538009e3b1f17..8e2aeb877de83 100644
> --- a/drivers/ufs/host/ufs-mediatek.c
> +++ b/drivers/ufs/host/ufs-mediatek.c
[ ... ]
> @@ -1234,8 +1231,6 @@ static int ufs_mtk_init(struct ufs_hba *hba)
>  	hba->quirks |= UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL;
>  
>  	hba->quirks |= UFSHCD_QUIRK_MCQ_BROKEN_INTR;
> -	if (host->caps & UFS_MTK_CAP_MCQ_BROKEN_RTC)
> -		hba->quirks |= UFSHCD_QUIRK_MCQ_BROKEN_RTC;

[Severity: Low]
Does this removal leave UFSHCD_QUIRK_MCQ_BROKEN_RTC as dead code in the UFS
core?

Since no other host driver appears to set this quirk, the checks in
drivers/ufs/core/ufs-mcq.c (such as in ufshcd_mcq_sq_stop) and its definition
in include/ufs/ufshcd.h might now be unreachable:

drivers/ufs/core/ufs-mcq.c:ufshcd_mcq_sq_stop() {
    ...
	if (hba->quirks & UFSHCD_QUIRK_MCQ_BROKEN_RTC)
		return -ETIMEDOUT;
    ...
}

Should the UFSHCD_QUIRK_MCQ_BROKEN_RTC definition and its related checks also
be cleaned up from the core?

>  
>  	hba->vps->wb_flush_threshold = UFS_WB_BUF_REMAIN_PERCENT(80);
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260914-mt8196-ufs-v12-0-9279d7ef814d@collabora.com?part=15



More information about the linux-phy mailing list