* [PATCH] PCI: dwc: Use of_property_present() for non-boolean properties
@ 2024-11-04 19:07 Rob Herring (Arm)
2024-11-04 20:48 ` Krzysztof Wilczyński
2024-11-15 7:17 ` Manivannan Sadhasivam
0 siblings, 2 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2024-11-04 19:07 UTC (permalink / raw)
To: Jingoo Han, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński, Bjorn Helgaas
Cc: linux-pci, linux-kernel
The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
drivers/pci/controller/dwc/pcie-designware-host.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index 3e41865c7290..d2291c3ceb8b 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -474,8 +474,8 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
if (pci_msi_enabled()) {
pp->has_msi_ctrl = !(pp->ops->msi_init ||
- of_property_read_bool(np, "msi-parent") ||
- of_property_read_bool(np, "msi-map"));
+ of_property_present(np, "msi-parent") ||
+ of_property_present(np, "msi-map"));
/*
* For the has_msi_ctrl case the default assignment is handled
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] PCI: dwc: Use of_property_present() for non-boolean properties
2024-11-04 19:07 [PATCH] PCI: dwc: Use of_property_present() for non-boolean properties Rob Herring (Arm)
@ 2024-11-04 20:48 ` Krzysztof Wilczyński
2024-11-15 7:17 ` Manivannan Sadhasivam
1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Wilczyński @ 2024-11-04 20:48 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: Jingoo Han, Manivannan Sadhasivam, Lorenzo Pieralisi,
Bjorn Helgaas, linux-pci, linux-kernel
Hello,
> The use of of_property_read_bool() for non-boolean properties is
> deprecated in favor of of_property_present() when testing for property
> presence.
Applied to controller/dwc, thank you!
[01/01] PCI: dwc: Use of_property_present() for non-boolean properties
https://git.kernel.org/pci/pci/c/6734997ebd6e
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] PCI: dwc: Use of_property_present() for non-boolean properties
2024-11-04 19:07 [PATCH] PCI: dwc: Use of_property_present() for non-boolean properties Rob Herring (Arm)
2024-11-04 20:48 ` Krzysztof Wilczyński
@ 2024-11-15 7:17 ` Manivannan Sadhasivam
2024-11-16 18:38 ` Krzysztof Wilczyński
1 sibling, 1 reply; 4+ messages in thread
From: Manivannan Sadhasivam @ 2024-11-15 7:17 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: Jingoo Han, Lorenzo Pieralisi, Krzysztof Wilczyński,
Bjorn Helgaas, linux-pci, linux-kernel
On Mon, Nov 04, 2024 at 01:07:13PM -0600, Rob Herring (Arm) wrote:
> The use of of_property_read_bool() for non-boolean properties is
> deprecated in favor of of_property_present() when testing for property
> presence.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
- Mani
> ---
> drivers/pci/controller/dwc/pcie-designware-host.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index 3e41865c7290..d2291c3ceb8b 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -474,8 +474,8 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
>
> if (pci_msi_enabled()) {
> pp->has_msi_ctrl = !(pp->ops->msi_init ||
> - of_property_read_bool(np, "msi-parent") ||
> - of_property_read_bool(np, "msi-map"));
> + of_property_present(np, "msi-parent") ||
> + of_property_present(np, "msi-map"));
>
> /*
> * For the has_msi_ctrl case the default assignment is handled
> --
> 2.45.2
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] PCI: dwc: Use of_property_present() for non-boolean properties
2024-11-15 7:17 ` Manivannan Sadhasivam
@ 2024-11-16 18:38 ` Krzysztof Wilczyński
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Wilczyński @ 2024-11-16 18:38 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: Rob Herring (Arm), Jingoo Han, Lorenzo Pieralisi, Bjorn Helgaas,
linux-pci, linux-kernel
Hello,
> > The use of of_property_read_bool() for non-boolean properties is
> > deprecated in favor of of_property_present() when testing for property
> > presence.
> >
> > Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
>
> Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Picked this tag, too. Thank you!
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-16 18:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-04 19:07 [PATCH] PCI: dwc: Use of_property_present() for non-boolean properties Rob Herring (Arm)
2024-11-04 20:48 ` Krzysztof Wilczyński
2024-11-15 7:17 ` Manivannan Sadhasivam
2024-11-16 18:38 ` Krzysztof Wilczyński
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox