Re: [PATCH] Trivial sched: Pass domain_attr to build_sched_domains()

From: Kamalesh Babulal
Date: Wed May 23 2012 - 06:02:05 EST


* Peter Zijlstra <peterz@xxxxxxxxxxxxx> [2012-05-23 09:48:58]:

> On Wed, 2012-05-23 at 12:11 +0530, Kamalesh Babulal wrote:
> > 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().

Signed-off-by: Kamalesh Babulal <kamalesh@xxxxxxxxxxxxxxxxxx>
---
kernel/sched/core.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 22a19ae..964bf9d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -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();

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/