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: <4abbf772-8254-4892-be3c-6d7af708f459@quicinc.com>
Date: Thu, 30 Jan 2025 00:02:01 +0530
From: Raj Kumar Bhagat <quic_rajkbhag@...cinc.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, <ath12k@...ts.infradead.org>
CC: <linux-wireless@...r.kernel.org>, Kalle Valo <kvalo@...nel.org>,
        "Rob
 Herring" <robh@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        "Conor
 Dooley" <conor+dt@...nel.org>,
        Jeff Johnson <jjohnson@...nel.org>, <linux-kernel@...r.kernel.org>,
        <devicetree@...r.kernel.org>,
        "Sowmiya Sree
 Elavalagan" <quic_ssreeela@...cinc.com>
Subject: Re: [PATCH v4 09/13] wifi: ath12k: Power up root PD

On 12/10/2024 8:20 PM, Krzysztof Kozlowski wrote:
> On 10/12/2024 08:41, Raj Kumar Bhagat wrote:
>> +
>> +static void ath12k_ahb_unregister_rproc_notifier(struct ath12k_base *ab)
>> +{
>> +	struct ath12k_ahb *ab_ahb = ath12k_ab_to_ahb(ab);
>> +
>> +	if (!ab_ahb->root_pd_notifier) {
>> +		ath12k_err(ab, "Rproc notifier not registered\n");
>> +		return;
>> +	}
>> +
>> +	qcom_unregister_ssr_notifier(ab_ahb->root_pd_notifier,
>> +				     &ab_ahb->root_pd_nb);
>> +}
>> +
>> +static int ath12k_ahb_get_rproc(struct ath12k_base *ab)
>> +{
>> +	struct ath12k_ahb *ab_ahb = ath12k_ab_to_ahb(ab);
>> +	struct device *dev = ab->dev;
>> +	struct rproc *prproc;
>> +	phandle rproc_phandle;
>> +
>> +	if (of_property_read_u32(dev->of_node, "qcom,rproc", &rproc_phandle)) {
> 
> You are not supposed to read phandles as numbers but use proper phandle
> parsing API. See of.h, e.g. of_parse_phandle.
> 

will use of_parse_phandle() in next version.

>> +		ath12k_err(ab, "failed to get q6_rproc handle\n");
>> +		return -ENOENT;
>> +	}
>> +
>> +	prproc = rproc_get_by_phandle(rproc_phandle);
>> +	if (!prproc) {
>> +		ath12k_err(ab, "failed to get rproc\n");
> 
> This is supposed to be dev_err_probe. Lack of handling deferred probes
> and resulting dmesg flood is all over your code. You need to start
> supporting defer.
> 

Sure, will use dev_err_probe() in next version for all applicable probe error log.

>> +		return -EINVAL;
>> +	}
>> +	ab_ahb->tgt_rproc = prproc;
>> +
>> +	return 0;
>> +}
> 
> 
> 
> 
> Best regards,
> Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ