Trivial sched: Pass domain_attr to build_sched_domains()
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
@@ -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;
Peter Zijlstra
maintainerQuoted 6 lines · Kamalesh Babulal
sched: Pass
domain_attrtobuild_sched_domains()
build_sched_domains()is called frominit_sched_domains()by explicitly passing NULL as second argument, which is of typesched_domain_attr. This patch callsbuild_sched_domains()withdattr_curinstead of NULL, asdattr_curis also NULL.
So what's the point? Rather clean up the dattr crap, no?
Quoted 16 lines
Signed-off-by Kamalesh Babulal <[email protected]>---
kernel/sched/core.c +1
-1@@ -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;
Quoted 9 lines · Peter Zijlstra
Quoted 6 lines · Kamalesh Babulal
sched: Pass
domain_attrtobuild_sched_domains()
build_sched_domains()is called frominit_sched_domains()by explicitly passing NULL as second argument, which is of typesched_domain_attr. This patch callsbuild_sched_domains()withdattr_curinstead of NULL, asdattr_curis 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 pointerdattr_cur from init_sched_domains().
--- kernel/sched/core.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
kernel/sched/core.c +0 -1
@@ -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 ();
[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 pointerdattr_cur from init_sched_domains().
--- kernel/sched/core.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
kernel/sched/core.c +0 -1
@@ -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 ();