Re: [PATCH v3 1/2] ufs: core: introduce a choice of wb toggle during clock scaling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/2/22 07:32, peter.wang@xxxxxxxxxxxx wrote:
+	/* Allow WB with clk scaling */

This comment is misleading. Consider changing this comment into something like "Enable WB when scaling up the clock and disable WB when scaling the clock down".

+	UFSHCD_CAP_WB_WITH_CLK_SCALING			= 1 << 12,

Whether or not the WriteBooster is toggled when the clock is scaled is not a host controller capability. It is a policy that is tied by this patch to the host controller. So I think that using the "UFSHCD_CAP_" prefix is misleading. Consider using e.g. the prefix UFSHCD_POLICY_.

> +static inline bool ufshcd_can_wb_during_scaling(struct ufs_hba *hba)
> +{
> +	return hba->caps & UFSHCD_CAP_WB_WITH_CLK_SCALING;
> +}

The name of this function is misleading. Consider renaming this function into e.g. ufshcd_enable_wb_if_scaling_up().

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux