lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86c27d90-9280-489e-b00e-187977657ee4@quicinc.com>
Date:   Tue, 28 Nov 2023 15:49:36 +0800
From:   Can Guo <quic_cang@...cinc.com>
To:     Manivannan Sadhasivam <mani@...nel.org>
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 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@...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.
> 

No worries, will do in next version.

Thanks,
Can Guo.

> - Mani
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ