mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Sachin Kamat <sachin.kamat@samsung.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mturquette@linaro.org" <mturquette@linaro.org>,
	"spk.linux@gmail.com" <spk.linux@gmail.com>
Subject: Re: [PATCH 1/1] clk: Fix build warnings
Date: Mon, 30 Jun 2014 16:37:12 +0300	[thread overview]
Message-ID: <20140630133712.GU3679@tbergstrom-lnx.Nvidia.com> (raw)
In-Reply-To: <1404121254-23823-1-git-send-email-sachin.kamat@samsung.com>

On Mon, Jun 30, 2014 at 11:40:54AM +0200, Sachin Kamat wrote:
> ‘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]
> 

Maybe just move them inside the existing #ifdef CONFIG_DEBUG_FS / #endif?

Like:

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 7dfb2f3..3b735de 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)
 {
@@ -108,6 +97,17 @@ static void clk_enable_unlock(unsigned long flags)
 #ifdef CONFIG_DEBUG_FS
 #include <linux/debugfs.h>
 
+static struct hlist_head *all_lists[] = {
+	&clk_root_list,
+	&clk_orphan_list,
+	NULL,
+};
+
+static struct hlist_head *orphan_list[] = {
+	&clk_orphan_list,
+	NULL,
+};
+
 static struct dentry *rootdir;
 static int inited = 0;
 
Thanks for finding this.

Cheers,

Peter.

  reply	other threads:[~2014-06-30 13:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30  9:40 Sachin Kamat
2014-06-30 13:37 ` Peter De Schrijver [this message]
2014-07-01  6:28   ` Sachin Kamat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140630133712.GU3679@tbergstrom-lnx.Nvidia.com \
    --to=pdeschrijver@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=sachin.kamat@samsung.com \
    --cc=spk.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®