Re: [PATCH v4 09/13] wifi: ath12k: Power up root PD

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

 



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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux