[PATCH v1 01/10] ufs: host: mediatek: Change return type to bool

Peter Wang (王信友) peter.wang at mediatek.com
Wed Jul 16 23:37:57 PDT 2025


On Wed, 2025-07-16 at 08:19 -0700, Bart Van Assche wrote:
> 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On 7/15/25 11:25 PM, peter.wang at mediatek.com wrote:
> > This patch updates the return type to bool for consistency
> > with the previous style.
> 
> What previous style?
> 
> Please follow the style that is used elsewhere in the Linux kernel
> and
> do *not* introduce any unnecessary explicit conversions to bool.
> 
> Bart.


Hi Bart,

This is to be consistent with the usage earlier in mediatek.c, such as

static bool ufs_mtk_is_pmc_via_fastauto(struct ufs_hba *hba)
{
	struct ufs_mtk_host *host = ufshcd_get_variant(hba);

	return !!(host->caps & UFS_MTK_CAP_PMC_VIA_FASTAUTO);
}

Or do you suggest removing all the previous usages instead?

Thanks.
Peter



More information about the Linux-mediatek mailing list