[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a76fca66-70ce-4a6a-ae39-dc218d57fc83@kernel.org>
Date: Tue, 10 Dec 2024 15:50:37 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Raj Kumar Bhagat <quic_rajkbhag@...cinc.com>, 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 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.
> + 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.
> + return -EINVAL;
> + }
> + ab_ahb->tgt_rproc = prproc;
> +
> + return 0;
> +}
Best regards,
Krzysztof
Powered by blists - more mailing lists