Skip to contentSkip to conversation

interconnect: fix build warning without DEBUGFS

PATCH Superseded Arnd Bergmann 1 participant 1 message Sep 26, 2018 Interconnect API

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 interconnect: fix build warning without DEBUGFS

The icc_debugfs_dir variable is only used inside of an #ifdef and should be moved into the same to avoid a harmless warning:

drivers/interconnect/core.c:26:23: error: 'icc_debugfs_dir' defined but not used [-Werror=unused-variable]

Fixes d54599e06b06 ("interconnect: Allow endpoints translation via DT")
---
 drivers/interconnect/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/interconnect/core.c +2 -1
index 2740f1a441d8..2d8709cf59a4 100644
@@ -23,7 +23,6 @@
 static DEFINE_IDR(icc_idr);
 static LIST_HEAD(icc_provider_list);
 static DEFINE_MUTEX(icc_lock);
-static struct dentry *icc_debugfs_dir;
 
 /**
  * struct icc_req - constraints that are attached to each node
@@ -54,6 +53,8 @@ struct icc_path {
 
 #ifdef CONFIG_DEBUG_FS
 
+static struct dentry *icc_debugfs_dir;
+
 static void icc_summary_show_one(struct seq_file *s, struct icc_node *n)
 {
 	if (!n)
Signature · 1 line
2.18.0