
From: Hanjun Guo <guohanjun@huawei.com> hulk inclusion category: bugfix bugzilla: NA CVE: NA When CONFIG_DEBUG_FS is not set, compile warning: /drivers/clk/clk.c:49:27: warning: 'orphan_list' defined but not used [-Wunused-variable] 49 | static struct hlist_head *orphan_list[] = { | ^~~~~~~~~~~ Fix it by moving the orphan_list to #ifdef CONFIG_DEBUG_FS braces. Signed-off-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/clk/clk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index c5cf9e77fe86..925dd84293f4 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -46,11 +46,6 @@ static struct hlist_head *all_lists[] = { NULL, }; -static struct hlist_head *orphan_list[] = { - &clk_orphan_list, - NULL, -}; - /*** private data structures ***/ struct clk_core { @@ -2629,6 +2624,11 @@ static int inited = 0; static DEFINE_MUTEX(clk_debug_lock); static HLIST_HEAD(clk_debug_list); +static struct hlist_head *orphan_list[] = { + &clk_orphan_list, + NULL, +}; + static void clk_summary_show_one(struct seq_file *s, struct clk_core *c, int level) { -- 2.25.1