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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86fe457b-7071-4e22-9c93-982854be442b@quicinc.com>
Date: Thu, 22 May 2025 03:19:24 +0530
From: Nitin Rawat <quic_nitirawa@...cinc.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
CC: <vkoul@...nel.org>, <kishon@...nel.org>,
        <James.Bottomley@...senpartnership.com>, <martin.petersen@...cle.com>,
        <bvanassche@....org>, <andersson@...nel.org>,
        <neil.armstrong@...aro.org>, <dmitry.baryshkov@....qualcomm.com>,
        <konrad.dybcio@....qualcomm.com>, <quic_rdwivedi@...cinc.com>,
        <quic_cang@...cinc.com>, <linux-arm-msm@...r.kernel.org>,
        <linux-phy@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
        <linux-scsi@...r.kernel.org>
Subject: Re: [PATCH V5 05/11] phy: qcom-qmp-ufs: Remove qmp_ufs_com_init()



On 5/21/2025 7:00 PM, Manivannan Sadhasivam wrote:
> On Thu, May 15, 2025 at 09:57:16PM +0530, Nitin Rawat wrote:
>> The qmp_ufs_power_on() function acts as a wrapper, solely invoking
>> qmp_ufs_com_init(). Additionally, the code within qmp_ufs_com_init()
>> does not correspond well with its name.
>>
>> Therefore, to enhance the readability and eliminate unnecessary
>> function call inline qmp_ufs_com_init() into qmp_ufs_power_on().
>>
>> There is no change to the functionality.
>>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
>> Signed-off-by: Nitin Rawat <quic_nitirawa@...cinc.com>
>> ---
>>   drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 43 ++++++++++---------------
>>   1 file changed, 17 insertions(+), 26 deletions(-)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
>> index 33d238cf49aa..d3f9ee490a32 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
>> @@ -1758,12 +1758,28 @@ static void qmp_ufs_init_registers(struct qmp_ufs *qmp, const struct qmp_phy_cfg
>>   		qmp_ufs_init_all(qmp, &cfg->tbls_hs_b);
>>   }
>>   
>> -static int qmp_ufs_com_init(struct qmp_ufs *qmp)
>> +static int qmp_ufs_com_exit(struct qmp_ufs *qmp)
> 
> Since there is no qmp_ufs_com_init() now, qmp_ufs_com_exit() lacks symmetry.
> Maybe you should rename it too.


Yes this is already taken care in differnt patch of this series.

> 
>>   {
>>   	const struct qmp_phy_cfg *cfg = qmp->cfg;
>> +
>> +	reset_control_assert(qmp->ufs_reset);
>> +
>> +	clk_bulk_disable_unprepare(qmp->num_clks, qmp->clks);
>> +
>> +	regulator_bulk_disable(cfg->num_vregs, qmp->vregs);
>> +
>> +	return 0;
>> +}
>> +
>> +static int qmp_ufs_power_on(struct phy *phy)
>> +{
>> +	struct qmp_ufs *qmp = phy_get_drvdata(phy);
>> +	const struct qmp_phy_cfg *cfg = qmp->cfg;
>>   	void __iomem *pcs = qmp->pcs;
>>   	int ret;
>>   
>> +	dev_vdbg(qmp->dev, "Initializing QMP phy\n");
> 
> Now, this debug print doesn't make sense. You can drop it.

Sure, wil remove.

> 
> - Mani
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ