Skip to content

Commit

Permalink
sched: clean up arch_reinit_sched_domains()
Browse files Browse the repository at this point in the history
- Make arch_reinit_sched_domains() static. It was exported to be used in
  s390, but now rebuild_sched_domains() is used instead.

- Make it return void.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Jan 5, 2009
1 parent 39aac64 commit c70f22d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,6 @@ static inline struct cpumask *sched_domain_span(struct sched_domain *sd)

extern void partition_sched_domains(int ndoms_new, struct cpumask *doms_new,
struct sched_domain_attr *dattr_new);
extern int arch_reinit_sched_domains(void);

/* Test a flag in parent sched domain */
static inline int test_sd_parent(struct sched_domain *sd, int flag)
Expand Down
9 changes: 3 additions & 6 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -7987,7 +7987,7 @@ void partition_sched_domains(int ndoms_new, struct cpumask *doms_new,
}

#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
int arch_reinit_sched_domains(void)
static void arch_reinit_sched_domains(void)
{
get_online_cpus();

Expand All @@ -7996,13 +7996,10 @@ int arch_reinit_sched_domains(void)

rebuild_sched_domains();
put_online_cpus();

return 0;
}

static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
{
int ret;
unsigned int level = 0;

if (sscanf(buf, "%u", &level) != 1)
Expand All @@ -8023,9 +8020,9 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
else
sched_mc_power_savings = level;

ret = arch_reinit_sched_domains();
arch_reinit_sched_domains();

return ret ? ret : count;
return count;
}

#ifdef CONFIG_SCHED_MC
Expand Down

0 comments on commit c70f22d

Please sign in to comment.