cacheinfo: Use of_property_present() for non-boolean properties

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>
Link: https://lore.kernel.org/r/20241104190342.270883-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Rob Herring (Arm)
2024-11-04 13:03:42 -06:00
committed by Greg Kroah-Hartman
parent 5852357d55
commit 2d038efcb4

View File

@@ -254,11 +254,11 @@ static int of_count_cache_leaves(struct device_node *np)
{
unsigned int leaves = 0;
if (of_property_read_bool(np, "cache-size"))
if (of_property_present(np, "cache-size"))
++leaves;
if (of_property_read_bool(np, "i-cache-size"))
if (of_property_present(np, "i-cache-size"))
++leaves;
if (of_property_read_bool(np, "d-cache-size"))
if (of_property_present(np, "d-cache-size"))
++leaves;
if (!leaves) {