[PATCH v14 13/23] scsi: ufs: mediatek: Remove vendor kernel quirks cruft
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Fri Oct 16 05:43:37 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] scsi: ufs: mediatek: Orphaned SIP macro and enum definitions
--
commit e7bac0e7488467d72dbbc1b3e957e1e9f9f5563a
Author: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>
scsi: ufs: mediatek: Remove vendor kernel quirks cruft
Both ufs_mtk_vreg_fix_vcc and ufs_mtk_vreg_fix_vccqx look like they are
vendor kernel hacks to work around existing downstream device trees.
Mainline does not need or want them, so remove them.
> diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
> index 46c9153be6e22..41e2e9f867013 100644
> --- a/drivers/ufs/host/ufs-mediatek.c
> +++ b/drivers/ufs/host/ufs-mediatek.c
> @@ -1066,73 +1066,6 @@ static void ufs_mtk_init_clocks(struct ufs_hba *hba)
> }
> }
>
> -#define MAX_VCC_NAME 30
> -static int ufs_mtk_vreg_fix_vcc(struct ufs_hba *hba)
> -{
> - struct ufs_vreg_info *info = &hba->vreg_info;
> - struct device_node *np = hba->dev->of_node;
> - struct device *dev = hba->dev;
> - char vcc_name[MAX_VCC_NAME];
> - struct arm_smccc_res res;
> - int err, ver;
> -
> - if (info->vcc)
> - return 0;
> -
> - if (of_property_read_bool(np, "mediatek,ufs-vcc-by-num")) {
> - ufs_mtk_get_vcc_num(res);
[Severity: Low]
Removing ufs_mtk_vreg_fix_vcc() removes the only caller of
ufs_mtk_get_vcc_num(). Does this leave the ufs_mtk_get_vcc_num() macro,
the UFS_MTK_SIP_GET_VCC_NUM definition, and enum ufs_mtk_vcc_num completely
unused in drivers/ufs/host/ufs-mediatek-sip.h?
Could these definitions also be removed to avoid leaving dead code?
> - if (res.a1 > UFS_VCC_NONE && res.a1 < UFS_VCC_MAX)
> - snprintf(vcc_name, MAX_VCC_NAME, "vcc-opt%lu", res.a1);
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016-mt8196-ufs-v14-0-e8d565e0cd45@collabora.com?part=13
More information about the linux-phy
mailing list