From 6b44c854b0f75d8dd1ea7f1d37621cfd82fbd2a9 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Tue, 1 Jul 2014 11:56:34 +0530 Subject: [PATCH] clk: Fix build warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ‘all_lists’ and ‘orphan_list’ is accessed only when DEBUG_FS is defined. Thus, make their compilation conditional to fix the below warnings introduced by commit 27b8d5f723 ("clk: flatten clk tree in debugfs"): drivers/clk/clk.c:40:27: warning: ‘all_lists’ defined but not used [-Wunused-variable] drivers/clk/clk.c:46:27: warning: ‘orphan_list’ defined but not used [-Wunused-variable] Signed-off-by: Sachin Kamat Cc: Peter De Schrijver Signed-off-by: Mike Turquette --- drivers/clk/clk.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 7dfb2f308b35..958967d141ee 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -36,17 +36,6 @@ static HLIST_HEAD(clk_root_list); static HLIST_HEAD(clk_orphan_list); static LIST_HEAD(clk_notifier_list); -static struct hlist_head *all_lists[] = { - &clk_root_list, - &clk_orphan_list, - NULL, -}; - -static struct hlist_head *orphan_list[] = { - &clk_orphan_list, - NULL, -}; - /*** locking ***/ static void clk_prepare_lock(void) { @@ -111,6 +100,17 @@ static void clk_enable_unlock(unsigned long flags) static struct dentry *rootdir; static int inited = 0; +static struct hlist_head *all_lists[] = { + &clk_root_list, + &clk_orphan_list, + NULL, +}; + +static struct hlist_head *orphan_list[] = { + &clk_orphan_list, + NULL, +}; + static void clk_summary_show_one(struct seq_file *s, struct clk *c, int level) { if (!c) -- 2.45.2