Skip to contentSkip to conversation

Trivial sched: Pass domain_attr to build_sched_domains()

PATCH In review Kamalesh Babulal 2 participants 4 messages May 23, 2012 – May 30, 2012 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Trivial sched: Pass domain_attr to build_sched_domains()

sched: Pass domain_attr to build_sched_domains()

build_sched_domains() is called from init_sched_domains() by explicitly passing NULL as second argument, which is of type sched_domain_attr. This patch calls build_sched_domains() with dattr_cur instead of NULL, as dattr_cur is also NULL.

---

kernel/sched/core.c +1 -1
index 22a19ae..32ccf13 100644
@@ -6735,7 +6735,7 @@ static int init_sched_domains(const struct cpumask *cpu_map)
 		doms_cur = &fallback_doms;
 	cpumask_andnot(doms_cur[0], cpu_map, cpu_isolated_map);
 	dattr_cur = NULL;
-	err = build_sched_domains(doms_cur[0], NULL);
+	err = build_sched_domains(doms_cur[0], dattr_cur);
 	register_sched_domain_sysctl();
 
 	return err;
maintainer
#1 lore raw
Quoted 6 lines · Kamalesh Babulal

sched: Pass domain_attr to build_sched_domains()

build_sched_domains() is called from init_sched_domains() by explicitly passing NULL as second argument, which is of type sched_domain_attr. This patch calls build_sched_domains() with dattr_cur instead of NULL, as dattr_cur is also NULL.

So what's the point? Rather clean up the dattr crap, no?

Quoted 16 lines

---

kernel/sched/core.c +1 -1
index 22a19ae..32ccf13 100644
@@ -6735,7 +6735,7 @@ static int init_sched_domains(const struct cpumask *cpu_map)
 		doms_cur = &fallback_doms;
 	cpumask_andnot(doms_cur[0], cpu_map, cpu_isolated_map);
 	dattr_cur = NULL;
-	err = build_sched_domains(doms_cur[0], NULL);
+	err = build_sched_domains(doms_cur[0], dattr_cur);
 	register_sched_domain_sysctl();
 
 	return err;
#2 lore raw
Quoted 9 lines · Peter Zijlstra
Quoted 6 lines · Kamalesh Babulal

sched: Pass domain_attr to build_sched_domains()

build_sched_domains() is called from init_sched_domains() by explicitly passing NULL as second argument, which is of type sched_domain_attr. This patch calls build_sched_domains() with dattr_cur instead of NULL, as dattr_cur is also NULL.

So what's the point? Rather clean up the dattr crap, no?

Thanks for the review.

As suggested, this version of patch drops dattr_cur from init_sched_domains().

sched: Remove NULL assignment to dattr_cur

Remove explicit NULL assignment of static pointer
dattr_cur from init_sched_domains().

---
 kernel/sched/core.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
kernel/sched/core.c +0 -1
index 22a19ae..964bf9d 100644
@@ -6734,7 +6734,6 @@ static int init_sched_domains(const struct cpumask *cpu_map)
 	if (!doms_cur)
 		doms_cur = &fallback_doms;
 	cpumask_andnot(doms_cur[0], cpu_map, cpu_isolated_map);
-	dattr_cur = NULL;
 	err = build_sched_domains(doms_cur[0], NULL);
 	register_sched_domain_sysctl();
 
#3 lore raw

[tip:sched/urgent] sched: Remove NULL assignment of dattr_cur

Commit-ID:  6a4c96eef42f835734a82c6b512abf9881b7c55d
Gitweb:     http://git.kernel.org/tip/6a4c96eef42f835734a82c6b512abf9881b7c55d
Author:     Kamalesh Babulal <[email protected]>
AuthorDate: Wed, 23 May 2012 14:44:11 +0530
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 30 May 2012 14:02:27 +0200

sched: Remove NULL assignment of dattr_cur

Remove explicit NULL assignment of static pointer
dattr_cur from init_sched_domains().

---
 kernel/sched/core.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
kernel/sched/core.c +0 -1
index 94d598a..c46958e 100644
@@ -6726,7 +6726,6 @@ static int init_sched_domains(const struct cpumask *cpu_map)
 	if (!doms_cur)
 		doms_cur = &fallback_doms;
 	cpumask_andnot(doms_cur[0], cpu_map, cpu_isolated_map);
-	dattr_cur = NULL;
 	err = build_sched_domains(doms_cur[0], NULL);
 	register_sched_domain_sysctl();