[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <467b9ba0-5dea-49c5-ab43-435d3d3fd6bc@acm.org>
Date: Tue, 1 Apr 2025 21:20:59 -0700
From: Bart Van Assche <bvanassche@....org>
To: Huan Tang <tanghuan@...o.com>, alim.akhtar@...sung.com,
avri.altman@....com, James.Bottomley@...senPartnership.com,
martin.petersen@...cle.com, beanhuo@...ron.com, luhongfei@...o.com,
quic_cang@...cinc.com, keosung.park@...sung.com, viro@...iv.linux.org.uk,
quic_mnaresh@...cinc.com, peter.wang@...iatek.com,
manivannan.sadhasivam@...aro.org, ahalaney@...hat.com,
quic_nguyenb@...cinc.com, linux@...ssschuh.net, ebiggers@...gle.com,
minwoo.im@...sung.com, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org
Cc: opensource.kernel@...o.com
Subject: Re: [PATCH v7] ufs: core: Add WB buffer resize support
On 4/1/25 9:45 PM, Huan Tang wrote:
> diff --git a/Documentation/ABI/testing/sysfs-driver-ufs b/Documentation/ABI/testing/sysfs-driver-ufs
> index ae0191295d29..efa1e2df292c 100644
> --- a/Documentation/ABI/testing/sysfs-driver-ufs
> +++ b/Documentation/ABI/testing/sysfs-driver-ufs
> @@ -1604,3 +1604,55 @@ Description:
> prevent the UFS from frequently performing clock gating/ungating.
>
> The attribute is read/write.
> +
> +What: /sys/bus/platform/drivers/ufshcd/*/wb_resize_enable
> +What: /sys/bus/platform/devices/*.ufs/wb_resize_enable
> +Date: April 2025
> +Contact: Huan Tang <tanghuan@...o.com>
> +Description:
> + The host can decrease or increase the WriteBooster Buffer size by setting
> + this attribute.
> +
> + ======== ======================================
> + IDLE There is no resize operation
> + DECREASE Decrease WriteBooster buffer size
> + INCREASE Increase WriteBooster buffer size
> + Others Reserved
> + ======== ======================================
> +
> + The attribute is write only.
The description of the attribute contradicts the name of the attribute.
Wouldn't wb_resize_enable be a better name for this attribute?
Additionally, that name will be easier to recognize for anyone who is
familiar with the UFS 4.1 standard.
To be consistent with other sysfs attributes, the names of the verbs
should be changed from upper case to lower case and "Others - Reserved"
should be left out. This comment also applies to the other attributes.
> +static const char *ufs_wb_resize_hint_to_string(enum wb_resize_hint hint)
> +{
> + switch (hint) {
> + case WB_RESIZE_HINT_KEEP: return "KEEP";
> + case WB_RESIZE_HINT_DECREASE: return "DECREASE";
> + case WB_RESIZE_HINT_INCREASE: return "INCREASE";
> + default: return "UNKNOWN";
> + }
> +}
The formatting of the above switch/case statement is not compliant with
the Linux kernel coding style.
Thanks,
Bart.
Powered by blists - more mailing lists