Skip to content

Commit 1a98fb1

Browse files
robherringmehmetb0
authored andcommitted
riscv: cacheinfo: Use of_property_present() for non-boolean properties
BugLink: https://bugs.launchpad.net/bugs/2106703 commit fb8179c upstream. 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) <[email protected]> Reviewed-by: Clément Léger <[email protected]> Cc: [email protected] Fixes: 76d2a04 ("RISC-V: Init and Halt Code") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Noah Wager <[email protected]> Signed-off-by: Mehmet Basaran <[email protected]>
1 parent c1cd8a3 commit 1a98fb1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

arch/riscv/kernel/cacheinfo.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ int populate_cache_leaves(unsigned int cpu)
103103
if (!np)
104104
return -ENOENT;
105105

106-
if (of_property_read_bool(np, "cache-size"))
106+
if (of_property_present(np, "cache-size"))
107107
ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
108-
if (of_property_read_bool(np, "i-cache-size"))
108+
if (of_property_present(np, "i-cache-size"))
109109
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
110-
if (of_property_read_bool(np, "d-cache-size"))
110+
if (of_property_present(np, "d-cache-size"))
111111
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
112112

113113
prev = np;
@@ -120,11 +120,11 @@ int populate_cache_leaves(unsigned int cpu)
120120
break;
121121
if (level <= levels)
122122
break;
123-
if (of_property_read_bool(np, "cache-size"))
123+
if (of_property_present(np, "cache-size"))
124124
ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
125-
if (of_property_read_bool(np, "i-cache-size"))
125+
if (of_property_present(np, "i-cache-size"))
126126
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
127-
if (of_property_read_bool(np, "d-cache-size"))
127+
if (of_property_present(np, "d-cache-size"))
128128
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
129129
levels = level;
130130
}

0 commit comments

Comments
 (0)