Skip to content

Commit

Permalink
sched: convert struct root_domain to cpumask_var_t, fix
Browse files Browse the repository at this point in the history
Mathieu Desnoyers reported this build failure on powerpc:

 kernel/sched.c: In function 'sd_init_NODE':
 kernel/sched.c:7319: error: non-static initialization of a flexible array member
 kernel/sched.c:7319: error: (near initialization for '(anonymous)')

this happens because .span changed to cpumask_var_t, hence
the static CPU_MASK_NONE initializers in the SD_*_INIT
templates are not type-correct anymore.

Remove them, as they default to empty anyway.

Also remove them from IA64, MIPS and SH.

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Nov 26, 2008
1 parent 1224e37 commit 1c39194
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions arch/ia64/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
void build_cpu_to_node_map(void);

#define SD_CPU_INIT (struct sched_domain) { \
.span = CPU_MASK_NONE, \
.parent = NULL, \
.child = NULL, \
.groups = NULL, \
Expand All @@ -80,7 +79,6 @@ void build_cpu_to_node_map(void);

/* sched_domains SD_NODE_INIT for IA64 NUMA machines */
#define SD_NODE_INIT (struct sched_domain) { \
.span = CPU_MASK_NONE, \
.parent = NULL, \
.child = NULL, \
.groups = NULL, \
Expand Down
1 change: 0 additions & 1 deletion arch/mips/include/asm/mach-ip27/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];

/* sched_domains SD_NODE_INIT for SGI IP27 machines */
#define SD_NODE_INIT (struct sched_domain) { \
.span = CPU_MASK_NONE, \
.parent = NULL, \
.child = NULL, \
.groups = NULL, \
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ static inline int pcibus_to_node(struct pci_bus *bus)

/* sched_domains SD_NODE_INIT for PPC64 machines */
#define SD_NODE_INIT (struct sched_domain) { \
.span = CPU_MASK_NONE, \
.parent = NULL, \
.child = NULL, \
.groups = NULL, \
Expand Down
1 change: 0 additions & 1 deletion arch/sh/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

/* sched_domains SD_NODE_INIT for sh machines */
#define SD_NODE_INIT (struct sched_domain) { \
.span = CPU_MASK_NONE, \
.parent = NULL, \
.child = NULL, \
.groups = NULL, \
Expand Down

0 comments on commit 1c39194

Please sign in to comment.