Commit e2a6ce5b authored by David Mosberger's avatar David Mosberger Committed by Tony Luck

[IA64] domain.c: eliminate warning when compiling CONFIG_NUMA=n

When compiling for non-NUMA variable "node" ended up not being used,
which solicits a warning from GCC.  Fix is to evluate cpu_to_node(i)
in place.  This has the effect of doing cpu_to_node(i) twice on NUMA,
but this is init code, so performance is not an issue (and even if
it were, you can just declare cpu_to_node() as being a pure function,
so the compiler can eliminate the second call).
Signed-off-by: default avatarDavid Mosberger-Tang <davidm@hpl.hp.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 4eaac8b3
......@@ -151,10 +151,9 @@ void __devinit arch_init_sched_domains(void)
* Set up domains. Isolated domains just stay on the dummy domain.
*/
for_each_cpu_mask(i, cpu_default_map) {
int node = cpu_to_node(i);
int group;
struct sched_domain *sd = NULL, *p;
cpumask_t nodemask = node_to_cpumask(node);
cpumask_t nodemask = node_to_cpumask(cpu_to_node(i));
cpus_and(nodemask, nodemask, cpu_default_map);
......@@ -172,7 +171,7 @@ void __devinit arch_init_sched_domains(void)
sd = &per_cpu(node_domains, i);
*sd = SD_NODE_INIT;
sd->span = sched_domain_node_span(node);
sd->span = sched_domain_node_span(cpu_to_node(i));
sd->parent = p;
cpus_and(sd->span, sd->span, cpu_default_map);
#endif
......
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