wifi: ath11k: Use of_property_present() to test property presence
PATCH 1/1 wifi: ath11k: Use of_property_present() to test property presence
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.
---
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.
drivers/net/wireless/ath/ath11k/pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath11k/pci.c +2 -3
@@ -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);
Signature · 1 line
2.47.2
Quoted 10 lines · Rob Herring (Arm)
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, useof_property_present()instead.Signed-off-by Rob Herring (Arm) <[email protected]>---
I'm assuming this should still go to linux-wireless list? I had to manually add that, so looks like recentMAINTAINERSchanges 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
Quoted 18 lines
drivers/net/wireless/ath/ath11k/pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/net/wireless/ath/ath11k/pci.c +1
-1@@ -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;
drivers/net/wireless/ath/ath11k/pci.c static int ath11k_pci_probe(struct pci_dev *pdev, · line 961
Quoted 9 lines
drivers/net/wireless/ath/ath11k/pci.c +1
-2@@ -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
Jeff Johnson
AppliedQuoted 6 lines · Rob Herring (Arm)
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, useof_property_present()instead.
Applied, thanks!
[1/1] wifi: ath11k: Use of_property_present() to test property presence
commit: d118047f82408201eb433a7ff7d505e72515d7e0
Best regards,
Signature · 1 line
Jeff Johnson <[email protected]>