Re: [PATCH v5 01/10] scsi: ufs: host: Rename structure ufs_dev_params to ufs_host_params

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

 





On 11/28/2023 1:31 PM, Manivannan Sadhasivam wrote:
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@xxxxxxxxxx>
Signed-off-by: Can Guo <quic_cang@xxxxxxxxxxx>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>

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


No worries, will do in next version.

Thanks,
Can Guo.

- Mani





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux