[PATCH v11 17/24] scsi: ufs: mediatek: Clean up logging prints

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Sep 1 09:18:34 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing explicit `#include <linux/string_choices.h>` for `str_true_false()`.
--

commit 14b4b7d3f0923b03c71e3a5fddb58666e933f64a
Author: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>

scsi: ufs: mediatek: Clean up logging prints

This commit cleans up the logging levels in the MediaTek UFS driver to ensure
errors are logged at the error level rather than info or warning levels. It
also updates prints to use the user-friendly %pe format codes for errors.

> diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
> index 43fb5dbb250b0..a84bffe069eb8 100644
> --- a/drivers/ufs/host/ufs-mediatek.c
> +++ b/drivers/ufs/host/ufs-mediatek.c
[ ... ]
> @@ -859,7 +855,8 @@ static bool ufs_mtk_is_legacy_chipset(struct ufs_hba *hba, u32 hw_ip_ver)
>  	default:
>  		break;
>  	}
> -	dev_info(hba->dev, "legacy IP version - 0x%x, is legacy : %d", hw_ip_ver, is_legacy);
> +	dev_dbg(hba->dev, "IP version 0x%x, legacy = %s", hw_ip_ver,
> +		str_true_false(is_legacy));

[Severity: Low]
Does this code rely on implicit header inclusions? Using str_true_false() 
in ufs_mtk_is_legacy_chipset() requires linux/string_choices.h, but it 
doesn't appear to be explicitly included in this file or added by this patch.

>  
>  	return is_legacy;
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260901-mt8196-ufs-v11-0-dbd007704490@collabora.com?part=17



More information about the linux-phy mailing list