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: <bb4cd14e-a9ea-4c13-9774-cca169dcb8d1@quicinc.com>
Date: Wed, 19 Feb 2025 17:06:11 +0530
From: Jagadeesh Kona <quic_jkona@...cinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
CC: Bjorn Andersson <andersson@...nel.org>,
        Michael Turquette
	<mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>, Rob Herring
	<robh@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Conor Dooley
	<conor+dt@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>,
        Ajit Pandey
	<quic_ajipan@...cinc.com>,
        Imran Shaik <quic_imrashai@...cinc.com>,
        "Taniya
 Das" <quic_tdas@...cinc.com>,
        Satya Priya Kakitapalli
	<quic_skakitap@...cinc.com>,
        <linux-arm-msm@...r.kernel.org>, <linux-clk@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/5] clk: qcom: common: Attach clock power domains
 conditionally



On 2/18/2025 10:48 PM, Dmitry Baryshkov wrote:
> On Tue, Feb 18, 2025 at 07:56:48PM +0530, Jagadeesh Kona wrote:
>> Attach clock power domains in qcom_cc_really_probe() only
>> if the clock controller has not already attached to them.
> 
> Squash this to the previous patch and call the new function. No need to
> duplicate the code.
> 

I tried calling the new function here instead of duplicating code, but that
is leading to below warning since the desc passed to qcom_cc_really_probe()
has a const qualifier and hence we cannot update desc->pd_list inside
qcom_cc_really_probe().

drivers/clk/qcom/common.c:305:33:   WARNING : passing argument 2 of ‘qcom_cc_attach_pds’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

Thanks,
Jagadeesh

>>
>> Signed-off-by: Jagadeesh Kona <quic_jkona@...cinc.com>
>> ---
>>  drivers/clk/qcom/common.c | 9 ++++++---
>>  1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
>> index ec27f70b24bdec24edd2f6b3df0d766fc1cdcbf0..eb7e2a56d1d135f839fd9bd470ba6231ce775a8c 100644
>> --- a/drivers/clk/qcom/common.c
>> +++ b/drivers/clk/qcom/common.c
>> @@ -300,9 +300,12 @@ int qcom_cc_really_probe(struct device *dev,
>>  	if (!cc)
>>  		return -ENOMEM;
>>  
>> -	ret = devm_pm_domain_attach_list(dev, NULL, &cc->pd_list);
>> -	if (ret < 0 && ret != -EEXIST)
>> -		return ret;
>> +	cc->pd_list = desc->pd_list;
>> +	if (!cc->pd_list) {
>> +		ret = devm_pm_domain_attach_list(dev, NULL, &cc->pd_list);
>> +		if (ret < 0 && ret != -EEXIST)
>> +			return ret;
>> +	}
>>  
>>  	reset = &cc->reset;
>>  	reset->rcdev.of_node = dev->of_node;
>>
>> -- 
>> 2.34.1
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ