[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a7a6e077f3750b0385388187cd52010eef4a085.camel@gmail.com>
Date: Wed, 02 Apr 2025 10:51:01 +0200
From: Bean Huo <huobean@...il.com>
To: Huan Tang <tanghuan@...o.com>, alim.akhtar@...sung.com,
avri.altman@....com, bvanassche@....org,
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, 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 v8] ufs: core: Add WB buffer resize support
On Wed, 2025-04-02 at 15:57 +0800, Huan Tang wrote:
>
> +int ufshcd_wb_set_resize_en(struct ufs_hba *hba, u32 en_mode)
you must ensure the mode en_mode is within valid range (0-2), why not
use enum?
> +{
> + int ret;
> + u8 index;
> +
> + index = ufshcd_wb_get_query_index(hba);
> + ret = ufshcd_query_attr_retry(hba,
> UPIU_QUERY_OPCODE_WRITE_ATTR,
> + QUERY_ATTR_IDN_WB_BUF_RESIZE_EN,
> index, 0, &en_mode);
> + if (ret)
> + dev_err(hba->dev, "%s: Enable WB buf resize operation
> failed %d\n",
> + __func__, ret);
> +
> + return ret;
> +}
Powered by blists - more mailing lists