[2.6 patch] drivers/base/cpu.c: make code static

Previous thread: [2.6 patch] drivers/firmware/iscsi_ibft.c: make 3 functions static by Adrian Bunk on Wednesday, April 23, 2008 - 2:52 am. (5 messages)

Next thread: [2.6 patch] x86: make struct nommu_dma_ops static by Adrian Bunk on Wednesday, April 23, 2008 - 2:52 am. (1 message)
From: Adrian Bunk
Date: Wednesday, April 23, 2008 - 2:52 am

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

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---
8ab09fe4313384faa5e3577d99845cedccb245bc diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 6fe4174..da6f4ae 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -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);

--

From: Bert Wesarg
Date: Wednesday, April 23, 2008 - 5:58 am

I think the cpu_state_attr array a few lines down should be static too.

Bert
--

Previous thread: [2.6 patch] drivers/firmware/iscsi_ibft.c: make 3 functions static by Adrian Bunk on Wednesday, April 23, 2008 - 2:52 am. (5 messages)

Next thread: [2.6 patch] x86: make struct nommu_dma_ops static by Adrian Bunk on Wednesday, April 23, 2008 - 2:52 am. (1 message)