From: Ahmed S. Darwish Date: Tue, 8 May 2007 07:33:14 +0000 (-0700) Subject: rcutorture: Use ARRAY_SIZE macro when appropriate X-Git-Tag: v2.6.22-rc1~574 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=788e770eb2d17212eafaeedde0be56e3444c6b9a;p=linux-2.6 rcutorture: Use ARRAY_SIZE macro when appropriate Use ARRAY_SIZE macro already defined in kernel.h Signed-off-by: Ahmed S. Darwish Cc: "Paul E. McKenney" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index 75ca2a7404..7d20d764b8 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c @@ -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);