Skip to content

Commit 5d7801f

Browse files
committed
rcutorture: Expand rcu_torture_write_types() first "if" statement
This commit expands the rcu_torture_write_types() function's first "if" condition and body, placing one element per line, in order to make the compiler's error messages more helpful. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent cc8faf5 commit 5d7801f

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

kernel/rcu/rcutorture.c

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,12 +1195,29 @@ static void rcu_torture_write_types(void)
11951195
bool gp_poll_full1 = gp_poll_full, gp_sync1 = gp_sync;
11961196

11971197
/* Initialize synctype[] array. If none set, take default. */
1198-
if (!gp_cond1 && !gp_cond_exp1 && !gp_cond_full1 && !gp_cond_exp_full1 && !gp_exp1 &&
1199-
!gp_poll_exp1 && !gp_poll_exp_full1 && !gp_normal1 && !gp_poll1 && !gp_poll_full1 &&
1200-
!gp_sync1)
1201-
gp_cond1 = gp_cond_exp1 = gp_cond_full1 = gp_cond_exp_full1 = gp_exp1 =
1202-
gp_poll_exp1 = gp_poll_exp_full1 = gp_normal1 = gp_poll1 =
1203-
gp_poll_full1 = gp_sync1 = true;
1198+
if (!gp_cond1 &&
1199+
!gp_cond_exp1 &&
1200+
!gp_cond_full1 &&
1201+
!gp_cond_exp_full1 &&
1202+
!gp_exp1 &&
1203+
!gp_poll_exp1 &&
1204+
!gp_poll_exp_full1 &&
1205+
!gp_normal1 &&
1206+
!gp_poll1 &&
1207+
!gp_poll_full1 &&
1208+
!gp_sync1) {
1209+
gp_cond1 = true;
1210+
gp_cond_exp1 = true;
1211+
gp_cond_full1 = true;
1212+
gp_cond_exp_full1 = true;
1213+
gp_exp1 = true;
1214+
gp_poll_exp1 = true;
1215+
gp_poll_exp_full1 = true;
1216+
gp_normal1 = true;
1217+
gp_poll1 = true;
1218+
gp_poll_full1 = true;
1219+
gp_sync1 = true;
1220+
}
12041221
if (gp_cond1 && cur_ops->get_gp_state && cur_ops->cond_sync) {
12051222
synctype[nsynctypes++] = RTWS_COND_GET;
12061223
pr_info("%s: Testing conditional GPs.\n", __func__);

0 commit comments

Comments
 (0)