Skip to content

Commit ee3fab1

Browse files
cuiyunhuipalmer-dabbelt
authored andcommitted
riscv: cacheinfo: remove the useless input parameter (node) of ci_leaf_init()
ci_leaf_init() is a declared static function. The implementation of the function body and the caller do not use the parameter (struct device_node *node) input parameter, so remove it. Fixes: 6a24915 ("Revert "riscv: Set more data to cacheinfo"") Signed-off-by: Yunhui Cui <[email protected]> Reviewed-by: Jeremy Linton <[email protected]> Reviewed-by: Sudeep Holla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 1613e60 commit ee3fab1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

arch/riscv/kernel/cacheinfo.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ uintptr_t get_cache_geometry(u32 level, enum cache_type type)
6464
}
6565

6666
static void ci_leaf_init(struct cacheinfo *this_leaf,
67-
struct device_node *node,
6867
enum cache_type type, unsigned int level)
6968
{
7069
this_leaf->level = level;
@@ -80,11 +79,11 @@ int populate_cache_leaves(unsigned int cpu)
8079
int levels = 1, level = 1;
8180

8281
if (of_property_read_bool(np, "cache-size"))
83-
ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level);
82+
ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
8483
if (of_property_read_bool(np, "i-cache-size"))
85-
ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level);
84+
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
8685
if (of_property_read_bool(np, "d-cache-size"))
87-
ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level);
86+
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
8887

8988
prev = np;
9089
while ((np = of_find_next_cache_node(np))) {
@@ -97,11 +96,11 @@ int populate_cache_leaves(unsigned int cpu)
9796
if (level <= levels)
9897
break;
9998
if (of_property_read_bool(np, "cache-size"))
100-
ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level);
99+
ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
101100
if (of_property_read_bool(np, "i-cache-size"))
102-
ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level);
101+
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
103102
if (of_property_read_bool(np, "d-cache-size"))
104-
ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level);
103+
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
105104
levels = level;
106105
}
107106
of_node_put(np);

0 commit comments

Comments
 (0)