diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-08-12 12:08:19 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-08-12 12:08:19 -0400 |
commit | 6707de00fdec3e3225192fe3dcd21323a8936b1f (patch) | |
tree | cce42f90c916b851de0c7c60b6d98c23191cd49c | |
parent | 963c6527e0a0e285736ad482b8142d098f9c2288 (diff) |
sched: make global code static
This patch makes the following needlessly global code static:
- arch_reinit_sched_domains()
- struct attr_sched_mc_power_savings
- struct attr_sched_smt_power_savings
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/linux/cpu.h | 2 | ||||
-rw-r--r-- | kernel/sched.c | 46 |
2 files changed, 23 insertions, 25 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index c2236bbff412..1d5ded0836ee 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -41,8 +41,6 @@ extern void cpu_remove_sysdev_attr(struct sysdev_attribute *attr); | |||
41 | extern int cpu_add_sysdev_attr_group(struct attribute_group *attrs); | 41 | extern int cpu_add_sysdev_attr_group(struct attribute_group *attrs); |
42 | extern void cpu_remove_sysdev_attr_group(struct attribute_group *attrs); | 42 | extern void cpu_remove_sysdev_attr_group(struct attribute_group *attrs); |
43 | 43 | ||
44 | extern struct sysdev_attribute attr_sched_mc_power_savings; | ||
45 | extern struct sysdev_attribute attr_sched_smt_power_savings; | ||
46 | extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | 44 | extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); |
47 | 45 | ||
48 | #ifdef CONFIG_HOTPLUG_CPU | 46 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/kernel/sched.c b/kernel/sched.c index 6247e4a8350f..c02659f1bd09 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -6328,7 +6328,7 @@ int partition_sched_domains(cpumask_t *partition1, cpumask_t *partition2) | |||
6328 | } | 6328 | } |
6329 | 6329 | ||
6330 | #if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) | 6330 | #if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) |
6331 | int arch_reinit_sched_domains(void) | 6331 | static int arch_reinit_sched_domains(void) |
6332 | { | 6332 | { |
6333 | int err; | 6333 | int err; |
6334 | 6334 | ||
@@ -6357,24 +6357,6 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) | |||
6357 | return ret ? ret : count; | 6357 | return ret ? ret : count; |
6358 | } | 6358 | } |
6359 | 6359 | ||
6360 | int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls) | ||
6361 | { | ||
6362 | int err = 0; | ||
6363 | |||
6364 | #ifdef CONFIG_SCHED_SMT | ||
6365 | if (smt_capable()) | ||
6366 | err = sysfs_create_file(&cls->kset.kobj, | ||
6367 | &attr_sched_smt_power_savings.attr); | ||
6368 | #endif | ||
6369 | #ifdef CONFIG_SCHED_MC | ||
6370 | if (!err && mc_capable()) | ||
6371 | err = sysfs_create_file(&cls->kset.kobj, | ||
6372 | &attr_sched_mc_power_savings.attr); | ||
6373 | #endif | ||
6374 | return err; | ||
6375 | } | ||
6376 | #endif | ||
6377 | |||
6378 | #ifdef CONFIG_SCHED_MC | 6360 | #ifdef CONFIG_SCHED_MC |
6379 | static ssize_t sched_mc_power_savings_show(struct sys_device *dev, char *page) | 6361 | static ssize_t sched_mc_power_savings_show(struct sys_device *dev, char *page) |
6380 | { | 6362 | { |
@@ -6385,8 +6367,8 @@ static ssize_t sched_mc_power_savings_store(struct sys_device *dev, | |||
6385 | { | 6367 | { |
6386 | return sched_power_savings_store(buf, count, 0); | 6368 | return sched_power_savings_store(buf, count, 0); |
6387 | } | 6369 | } |
6388 | SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show, | 6370 | static SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show, |
6389 | sched_mc_power_savings_store); | 6371 | sched_mc_power_savings_store); |
6390 | #endif | 6372 | #endif |
6391 | 6373 | ||
6392 | #ifdef CONFIG_SCHED_SMT | 6374 | #ifdef CONFIG_SCHED_SMT |
@@ -6399,8 +6381,26 @@ static ssize_t sched_smt_power_savings_store(struct sys_device *dev, | |||
6399 | { | 6381 | { |
6400 | return sched_power_savings_store(buf, count, 1); | 6382 | return sched_power_savings_store(buf, count, 1); |
6401 | } | 6383 | } |
6402 | SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show, | 6384 | static SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show, |
6403 | sched_smt_power_savings_store); | 6385 | sched_smt_power_savings_store); |
6386 | #endif | ||
6387 | |||
6388 | int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls) | ||
6389 | { | ||
6390 | int err = 0; | ||
6391 | |||
6392 | #ifdef CONFIG_SCHED_SMT | ||
6393 | if (smt_capable()) | ||
6394 | err = sysfs_create_file(&cls->kset.kobj, | ||
6395 | &attr_sched_smt_power_savings.attr); | ||
6396 | #endif | ||
6397 | #ifdef CONFIG_SCHED_MC | ||
6398 | if (!err && mc_capable()) | ||
6399 | err = sysfs_create_file(&cls->kset.kobj, | ||
6400 | &attr_sched_mc_power_savings.attr); | ||
6401 | #endif | ||
6402 | return err; | ||
6403 | } | ||
6404 | #endif | 6404 | #endif |
6405 | 6405 | ||
6406 | /* | 6406 | /* |