Commit 6707de00 authored by Adrian Bunk's avatar Adrian Bunk Committed by Ingo Molnar

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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 963c6527
...@@ -41,8 +41,6 @@ extern void cpu_remove_sysdev_attr(struct sysdev_attribute *attr); ...@@ -41,8 +41,6 @@ extern void cpu_remove_sysdev_attr(struct sysdev_attribute *attr);
extern int cpu_add_sysdev_attr_group(struct attribute_group *attrs); extern int cpu_add_sysdev_attr_group(struct attribute_group *attrs);
extern void cpu_remove_sysdev_attr_group(struct attribute_group *attrs); extern void cpu_remove_sysdev_attr_group(struct attribute_group *attrs);
extern struct sysdev_attribute attr_sched_mc_power_savings;
extern struct sysdev_attribute attr_sched_smt_power_savings;
extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
......
...@@ -6328,7 +6328,7 @@ int partition_sched_domains(cpumask_t *partition1, cpumask_t *partition2) ...@@ -6328,7 +6328,7 @@ int partition_sched_domains(cpumask_t *partition1, cpumask_t *partition2)
} }
#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) #if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
int arch_reinit_sched_domains(void) static int arch_reinit_sched_domains(void)
{ {
int err; int err;
...@@ -6357,24 +6357,6 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) ...@@ -6357,24 +6357,6 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
return ret ? ret : count; return ret ? ret : count;
} }
int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
{
int err = 0;
#ifdef CONFIG_SCHED_SMT
if (smt_capable())
err = sysfs_create_file(&cls->kset.kobj,
&attr_sched_smt_power_savings.attr);
#endif
#ifdef CONFIG_SCHED_MC
if (!err && mc_capable())
err = sysfs_create_file(&cls->kset.kobj,
&attr_sched_mc_power_savings.attr);
#endif
return err;
}
#endif
#ifdef CONFIG_SCHED_MC #ifdef CONFIG_SCHED_MC
static ssize_t sched_mc_power_savings_show(struct sys_device *dev, char *page) static ssize_t sched_mc_power_savings_show(struct sys_device *dev, char *page)
{ {
...@@ -6385,7 +6367,7 @@ static ssize_t sched_mc_power_savings_store(struct sys_device *dev, ...@@ -6385,7 +6367,7 @@ static ssize_t sched_mc_power_savings_store(struct sys_device *dev,
{ {
return sched_power_savings_store(buf, count, 0); return sched_power_savings_store(buf, count, 0);
} }
SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show, static SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show,
sched_mc_power_savings_store); sched_mc_power_savings_store);
#endif #endif
...@@ -6399,10 +6381,28 @@ static ssize_t sched_smt_power_savings_store(struct sys_device *dev, ...@@ -6399,10 +6381,28 @@ static ssize_t sched_smt_power_savings_store(struct sys_device *dev,
{ {
return sched_power_savings_store(buf, count, 1); return sched_power_savings_store(buf, count, 1);
} }
SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show, static SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show,
sched_smt_power_savings_store); sched_smt_power_savings_store);
#endif #endif
int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
{
int err = 0;
#ifdef CONFIG_SCHED_SMT
if (smt_capable())
err = sysfs_create_file(&cls->kset.kobj,
&attr_sched_smt_power_savings.attr);
#endif
#ifdef CONFIG_SCHED_MC
if (!err && mc_capable())
err = sysfs_create_file(&cls->kset.kobj,
&attr_sched_mc_power_savings.attr);
#endif
return err;
}
#endif
/* /*
* Force a reinitialization of the sched domains hierarchy. The domains * Force a reinitialization of the sched domains hierarchy. The domains
* and groups cannot be updated in place without racing with the balancing * and groups cannot be updated in place without racing with the balancing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment