diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 15:46:56 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-03-30 14:36:35 +0200 |
commit | 857d423c74228cfa064f79ff3a16b163fdb8d542 (patch) | |
tree | 42cebf275a0709c63da9bda60d200c95ddaa4f51 /arch/powerpc/platforms/pseries/hotplug-cpu.c | |
parent | powerpc/rtas: lockdep annotations (diff) | |
download | linux-857d423c74228cfa064f79ff3a16b163fdb8d542.tar.xz linux-857d423c74228cfa064f79ff3a16b163fdb8d542.zip |
powerpc: Use of_property_present() for testing DT property presence
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.
Signed-off-by: Rob Herring <robh@kernel.org>
[mpe: Drop change in ppc4xx_probe_pci_bridge(), formatting]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230310144657.1541039-1-robh@kernel.org
Diffstat (limited to 'arch/powerpc/platforms/pseries/hotplug-cpu.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 982e5e4b5e06..1a3cb313976a 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -493,7 +493,7 @@ static bool valid_cpu_drc_index(struct device_node *parent, u32 drc_index) bool found = false; int rc, index; - if (of_find_property(parent, "ibm,drc-info", NULL)) + if (of_property_present(parent, "ibm,drc-info")) return drc_info_valid_index(parent, drc_index); /* Note that the format of the ibm,drc-indexes array is |