Skip to contentSkip to conversation

FIXED sparse warning : drivers/cpuidle/cpuidle.c:27:1: warning: symbol 'cpuidle_dev' was not declared. Should it be static?

PATCH New Sagar Padhye 1 participant 1 message Oct 2, 2013 CPU idle time management framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 FIXED sparse warning : drivers/cpuidle/cpuidle.c:27:1: warning: symbol 'cpuidle_dev' was not declared. Should it be static?

---
This is the first (and minor) patch I am sending out, hope this is ok. I checked that cpuidle_devices is only being used in cpuidle.c - hence thought that it can be made static and be removed from header.

 drivers/cpuidle/cpuidle.c | 4 ++--
 include/linux/cpuidle.h   | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/cpuidle/cpuidle.c +2 -2
index d75040d..4826506 100644
@@ -23,8 +23,8 @@
 
 #include "cpuidle.h"
 
-DEFINE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
-DEFINE_PER_CPU(struct cpuidle_device, cpuidle_dev);
+static DEFINE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
+static DEFINE_PER_CPU(struct cpuidle_device, cpuidle_dev);
 
 DEFINE_MUTEX(cpuidle_lock);
 LIST_HEAD(cpuidle_detected_devices);
include/linux/cpuidle.h +0 -1
index 781addc..96c8ed8 100644
@@ -83,7 +83,6 @@ struct cpuidle_device {
 #endif
 };
 
-DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
 
 /**
  * cpuidle_get_last_residency - retrieves the last state's residency time
Signature · 1 line
1.8.1.2