[PATCH 2.6.20] rcutorture: Use ARRAY_SIZE macro when appropriate

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ahmed S. Darwish
Date: Tuesday, February 6, 2007 - 9:08 am

Hi all,

A patch to use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
---
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 482b11f..97c2277 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);


-- 
Ahmed S. Darwish
http://darwish-07.blogspot.com
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00] A series of patches to use ARRAY_SIZE macro, Ahmed S. Darwish, (Tue Feb 6, 9:02 am)
[PATCH 2.6.20] DVB: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 9:03 am)
[PATCH 2.6.20] KVM: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 9:03 am)
[PATCH 2.6.20] atm: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 9:06 am)
[PATCH 2.6.20] rcutorture: Use ARRAY_SIZE macro when appro ..., Ahmed S. Darwish, (Tue Feb 6, 9:08 am)
[PATCH 2.6.20] w1: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 9:09 am)
[PATCH 2.6.20] drm: Use ARRAY_SIZE macro when appropriate, Ahmed S. Darwish, (Tue Feb 6, 9:10 am)
Re: [PATCH 2.6.20] w1: Use ARRAY_SIZE macro when appropriate, Evgeniy Polyakov, (Tue Feb 6, 9:19 am)
Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when ap ..., Philippe De Muyter, (Tue Feb 6, 2:18 pm)
Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when ap ..., Philippe De Muyter, (Wed Feb 7, 2:02 pm)