Skip to content

Commit

Permalink
rcutorture: Use ARRAY_SIZE macro when appropriate
Browse files Browse the repository at this point in the history
Use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Ahmed S. Darwish <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
a-darwish authored and Linus Torvalds committed May 8, 2007
1 parent c339662 commit 788e770
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/rcutorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ rcu_torture_init(void)
/* Set up the freelist. */

INIT_LIST_HEAD(&rcu_torture_freelist);
for (i = 0; i < sizeof(rcu_tortures) / sizeof(rcu_tortures[0]); i++) {
for (i = 0; i < ARRAY_SIZE(rcu_tortures); i++) {
rcu_tortures[i].rtort_mbtest = 0;
list_add_tail(&rcu_tortures[i].rtort_free,
&rcu_torture_freelist);
Expand Down

0 comments on commit 788e770

Please sign in to comment.