[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231128053136.GE3088@thinkpad>
Date: Tue, 28 Nov 2023 11:01:36 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Can Guo <quic_cang@...cinc.com>
Cc: bvanassche@....org, adrian.hunter@...el.com, beanhuo@...ron.com,
avri.altman@....com, junwoo80.lee@...sung.com,
martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
Alim Akhtar <alim.akhtar@...sung.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Stanley Chu <stanley.chu@...iatek.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Andrew Halaney <ahalaney@...hat.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Brian Masney <bmasney@...hat.com>,
"moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES"
<linux-arm-kernel@...ts.infradead.org>,
"open list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES"
<linux-samsung-soc@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"moderated list:UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER..."
<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v5 01/10] scsi: ufs: host: Rename structure
ufs_dev_params to ufs_host_params
On Tue, Nov 28, 2023 at 10:49:36AM +0530, Manivannan Sadhasivam wrote:
> On Thu, Nov 23, 2023 at 12:46:21AM -0800, Can Guo wrote:
> > Structure ufs_dev_params is actually used in UFS host vendor drivers to
> > declare host specific power mode parameters, like ufs_<vendor>_params or
> > host_cap, which makes the code not very straightforward to read. Rename the
> > structure ufs_dev_params to ufs_host_params and unify the declarations in
> > all vendor drivers to host_params.
> >
> > In addition, rename the two functions ufshcd_init_pwr_dev_param() and
> > ufshcd_get_pwr_dev_param() which work based on the ufs_host_params to
> > ufshcd_init_host_param() and ufshcd_negotiate_pwr_param() respectively to
> > avoid confusions.
> >
> > This change does not change any functionalities or logic.
> >
> > Acked-by: Andrew Halaney <ahalaney@...hat.com>
> > Signed-off-by: Can Guo <quic_cang@...cinc.com>
>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
>
> - Mani
>
> > ---
> > drivers/ufs/host/ufs-exynos.c | 7 ++--
> > drivers/ufs/host/ufs-hisi.c | 11 +++----
> > drivers/ufs/host/ufs-mediatek.c | 12 +++----
> > drivers/ufs/host/ufs-qcom.c | 12 +++----
> > drivers/ufs/host/ufshcd-pltfrm.c | 69 ++++++++++++++++++++--------------------
> > drivers/ufs/host/ufshcd-pltfrm.h | 10 +++---
> > 6 files changed, 57 insertions(+), 64 deletions(-)
> >
[...]
> > diff --git a/drivers/ufs/host/ufshcd-pltfrm.h b/drivers/ufs/host/ufshcd-pltfrm.h
> > index a86a3ad..2d4d047 100644
> > --- a/drivers/ufs/host/ufshcd-pltfrm.h
> > +++ b/drivers/ufs/host/ufshcd-pltfrm.h
> > @@ -10,7 +10,7 @@
> > #define UFS_PWM_MODE 1
> > #define UFS_HS_MODE 2
> >
> > -struct ufs_dev_params {
> > +struct ufs_host_params {
> > u32 pwm_rx_gear; /* pwm rx gear to work in */
> > u32 pwm_tx_gear; /* pwm tx gear to work in */
> > u32 hs_rx_gear; /* hs rx gear to work in */
> > @@ -25,10 +25,10 @@ struct ufs_dev_params {
> > u32 desired_working_mode;
> > };
> >
> > -int ufshcd_get_pwr_dev_param(const struct ufs_dev_params *dev_param,
> > - const struct ufs_pa_layer_attr *dev_max,
> > - struct ufs_pa_layer_attr *agreed_pwr);
> > -void ufshcd_init_pwr_dev_param(struct ufs_dev_params *dev_param);
> > +int ufshcd_negotiate_pwr_param(const struct ufs_host_params *host_param,
> > + const struct ufs_pa_layer_attr *dev_max,
> > + struct ufs_pa_layer_attr *agreed_pwr);
> > +void ufshcd_init_host_param(struct ufs_host_params *host_param);
Noticed this after giving my R-b tag. Could you please rename the functions to:
int ufshcd_negotiate_pwr_params(const struct ufs_host_params *host_params,...
void ufshcd_init_host_params(struct ufs_host_params *host_params);
Not a big deal, but since the argument passed to both functions are 'params',
it'd be good if the function definition also use the same plural form.
- Mani
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists