]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
clk: Mark 'all_lists' as const
authorStephen Boyd <sboyd@kernel.org>
Thu, 17 Feb 2022 22:05:53 +0000 (14:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2024 14:23:37 +0000 (16:23 +0200)
[ Upstream commit 75061a6ff49ba3482c6319ded0c26e6a526b0967 ]

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
Stable-dep-of: e581cf5d2162 ("clk: Get runtime PM before walking tree during disable_unused")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk.c

index 67a882e03dfdd841a3d63f9c773e6a7394057c19..1043addcd38f68a2d2106e4a216db3155ed8221d 100644 (file)
@@ -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,
@@ -4063,7 +4063,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);