Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteba9f08

Browse files
zhuguangqingIngo Molnar
zhuguangqing
authored and
Ingo Molnar
committed
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 willgenerate a build warning if it isn't the last member of a struct.[ mingo: Rewrote the changelog. ]Signed-off-by: zhuguangqing <zhuguangqing@xiaomi.com>Signed-off-by: Ingo Molnar <mingo@kernel.org>Link:https://lore.kernel.org/r/20201014140220.11384-1-zhuguangqing83@gmail.com
1 parent2646fb0 commiteba9f08

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
intid;
14721472
#endif
14731473

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

14771477
structsched_group {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp