drivers/base/cpu.c: make code static
PATCH 1/1 drivers/base/cpu.c: make code static
This patch makes the following needlessly global code static:
- attr_online_map
- attr_possible_map
- attr_present_map
---8ab09fe4313384faa5e3577d99845cedccb245bc diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 6fe4174..da6f4ae 100644
drivers/base/cpu.c +1 -1
@@ -119,7 +119,7 @@ static ssize_t print_cpus_##type(struct sysdev_class *class, char *buf) \ { \ 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);
Quoted 13 lines · Adrian Bunk
This patch makes the following needlessly global code static:
-attr_online_map
-attr_possible_map
-attr_present_mapSigned-off-by Adrian Bunk <[email protected]>---
8ab09fe4313384faa5e3577d99845cedccb245bcdiff --gita/drivers/base/cpu.cb/drivers/base/cpu.cindex 6fe4174..da6f4ae 100644
---a/drivers/base/cpu.c
+++b/drivers/base/cpu.c
@@ -119,7 +119,7 @@ staticssize_tprint_cpus_##type(structsysdev_class*class, char *buf) \
Quoted 8 lines
{ \ 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);
I think the cpu_state_attr array a few lines down should be static too.
Bert