[PATCH 06/11] cpu: change some globals to statics in drivers/base/cpu.c v2

From: Mike Travis
Date: Fri Apr 25 2008 - 20:18:39 EST


This patch makes the following needlessly global code static:
- attr_online_map
- attr_possible_map
- attr_present_map

- cpu_state_attr [v2]

Signed-off-by: Adrian Bunk <bunk@xxxxxxxxxx>
Signed-off-by: Mike Travis <travis@xxxxxxx>

---
v2: changed cpu_state_attr to static

8ab09fe4313384faa5e3577d99845cedccb245bc diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 6fe4174..da6f4ae 100644
---
drivers/base/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.sched.orig/drivers/base/cpu.c
+++ linux-2.6.sched/drivers/base/cpu.c
@@ -119,7 +119,7 @@ static ssize_t print_cpus_##type(struct
{ \
return print_cpus_map(buf, &cpu_##type##_map); \
} \
-struct sysdev_class_attribute attr_##type##_map = \
+static struct sysdev_class_attribute attr_##type##_map = \
_SYSDEV_CLASS_ATTR(type, 0444, print_cpus_##type, NULL)

print_cpus_func(online);
@@ -127,7 +127,7 @@ print_cpus_func(possible);
print_cpus_func(present);
print_cpus_func(system);

-struct sysdev_class_attribute *cpu_state_attr[] = {
+static struct sysdev_class_attribute *cpu_state_attr[] = {
&attr_online_map,
&attr_possible_map,
&attr_present_map,

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/