mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Huan Tang <tanghuan@vivo.com>,
	alim.akhtar@samsung.com, avri.altman@wdc.com,
	James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com, beanhuo@micron.com,
	luhongfei@vivo.com, quic_cang@quicinc.com,
	keosung.park@samsung.com, viro@zeniv.linux.org.uk,
	quic_mnaresh@quicinc.com, peter.wang@mediatek.com,
	manivannan.sadhasivam@linaro.org, ahalaney@redhat.com,
	quic_nguyenb@quicinc.com, linux@weissschuh.net,
	ebiggers@google.com, minwoo.im@samsung.com,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH v7] ufs: core: Add WB buffer resize support
Date: Tue, 1 Apr 2025 21:20:59 -0700	[thread overview]
Message-ID: <467b9ba0-5dea-49c5-ab43-435d3d3fd6bc@acm.org> (raw)
In-Reply-To: <20250402014536.162-1-tanghuan@vivo.com>

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@vivo.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.

  reply	other threads:[~2025-04-02  4:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02  1:45 Huan Tang
2025-04-02  4:20 ` Bart Van Assche [this message]
2025-04-02  8:07   ` Huan Tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=467b9ba0-5dea-49c5-ab43-435d3d3fd6bc@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=ahalaney@redhat.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=ebiggers@google.com \
    --cc=keosung.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=luhongfei@vivo.com \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=martin.petersen@oracle.com \
    --cc=minwoo.im@samsung.com \
    --cc=opensource.kernel@vivo.com \
    --cc=peter.wang@mediatek.com \
    --cc=quic_cang@quicinc.com \
    --cc=quic_mnaresh@quicinc.com \
    --cc=quic_nguyenb@quicinc.com \
    --cc=tanghuan@vivo.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®