From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: "Rob Herring (Arm)" <robh@kernel.org>,
Jeff Johnson <jjohnson@kernel.org>
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wifi: ath11k: Use of_property_present() to test property presence
Date: Thu, 10 Apr 2025 10:29:40 -0700 [thread overview]
Message-ID: <171e226a-eddd-4841-9672-b81b6b5a3038@oss.qualcomm.com> (raw)
In-Reply-To: <20250408190211.2505737-2-robh@kernel.org>
On 4/8/2025 12:02 PM, Rob Herring (Arm) wrote:
> The use of of_property_read_u32() isn't really correct as
> "memory-region" contains phandles (though those happen to be u32s. As
> it is just testing for property presence, use of_property_present()
> instead.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> I'm assuming this should still go to linux-wireless list? I had to
> manually add that, so looks like recent MAINTAINERS changes aren't quite
> right.
Yes, it should go to both ath11k and linux-wireless
Johannes has a fix that needs to make its way through the trees:
https://msgid.link/20250329220135.8bfaffbad97d.I946354c2395f4a30b8c435857a92553b1b58df5b@changeid
>
> drivers/net/wireless/ath/ath11k/pci.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/pci.c b/drivers/net/wireless/ath/ath11k/pci.c
> index 412f4a134e4a..87ef7f321065 100644
> --- a/drivers/net/wireless/ath/ath11k/pci.c
> +++ b/drivers/net/wireless/ath/ath11k/pci.c
> @@ -929,7 +929,7 @@ static int ath11k_pci_probe(struct pci_dev *pdev,
> {
> struct ath11k_base *ab;
> struct ath11k_pci *ab_pci;
> - u32 soc_hw_version_major, soc_hw_version_minor, addr;
> + u32 soc_hw_version_major, soc_hw_version_minor;
> int ret;
> u32 sub_version;
>
> @@ -955,8 +955,7 @@ static int ath11k_pci_probe(struct pci_dev *pdev,
> * from DT. If memory is reserved from DT for FW, ath11k driver need not
> * allocate memory.
> */
> - ret = of_property_read_u32(ab->dev->of_node, "memory-region", &addr);
> - if (!ret)
> + if (of_property_present(ab->dev->of_node, "memory-region"))
> set_bit(ATH11K_FLAG_FIXED_MEM_RGN, &ab->dev_flags);
>
> ret = ath11k_pci_claim(ab_pci, pdev);
LGTM, I'll pick this up
next prev parent reply other threads:[~2025-04-10 17:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 19:02 [PATCH] wifi: ath11k: Use of_property_present() to test property presence Rob Herring (Arm)
2025-04-10 17:29 ` Jeff Johnson [this message]
2025-04-12 4:24 ` Jeff Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=171e226a-eddd-4841-9672-b81b6b5a3038@oss.qualcomm.com \
--to=jeff.johnson@oss.qualcomm.com \
--cc=ath11k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox