Skip to content

Commit eba9f08

Browse files
zhuguangqingIngo Molnar
authored andcommitted
sched: Replace zero-length array with flexible-array
In the following commit: 04f5c36: ("sched/fair: Replace zero-length array with flexible-array") a zero-length array cpumask[0] has been replaced with cpumask[]. But there is still a cpumask[0] in 'struct sched_group_capacity' which was missed. The point of using [] instead of [0] is that with [] the compiler will generate a build warning if it isn't the last member of a struct. [ mingo: Rewrote the changelog. ] Signed-off-by: zhuguangqing <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2646fb0 commit eba9f08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/sched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ struct sched_group_capacity {
14711471
int id;
14721472
#endif
14731473

1474-
unsigned long cpumask[0]; /* Balance mask */
1474+
unsigned long cpumask[]; /* Balance mask */
14751475
};
14761476

14771477
struct sched_group {

0 commit comments

Comments
 (0)