projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa6ffe6
)
clk: Mark 'all_lists' as const
author
Stephen Boyd
<sboyd@kernel.org>
Thu, 17 Feb 2022 22:05:53 +0000
(14:05 -0800)
committer
Stephen Boyd
<sboyd@kernel.org>
Sat, 26 Feb 2022 01:02:46 +0000
(17:02 -0800)
This list array doesn't change at runtime. Mark it const to move to RO
memory.
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link:
https://lore.kernel.org/r/20220217220554.2711696-2-sboyd@kernel.org
drivers/clk/clk.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/clk/clk.c
b/drivers/clk/clk.c
index 8de6a22498e7030b5ef483a9c2f90599b66e6729..16384e9437f59380554de883adb9e5c562e8aa3b 100644
(file)
--- a/
drivers/clk/clk.c
+++ b/
drivers/clk/clk.c
@@
-37,7
+37,7
@@
static HLIST_HEAD(clk_root_list);
static HLIST_HEAD(clk_orphan_list);
static LIST_HEAD(clk_notifier_list);
-static struct hlist_head *all_lists[] = {
+static
const
struct hlist_head *all_lists[] = {
&clk_root_list,
&clk_orphan_list,
NULL,
@@
-4095,7
+4095,7
@@
static void clk_core_evict_parent_cache_subtree(struct clk_core *root,
/* Remove this clk from all parent caches */
static void clk_core_evict_parent_cache(struct clk_core *core)
{
- struct hlist_head **lists;
+
const
struct hlist_head **lists;
struct clk_core *root;
lockdep_assert_held(&prepare_lock);