LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/3] rcutorture: Use ARRAY_SIZE macro when appropriate
@ 2007-02-07 18:54 Josh Triplett
  2007-02-07 18:56 ` [PATCH 2/3] rcutorture: style cleanup: avoid != NULL in boolean tests Josh Triplett
  2007-02-07 18:57 ` [PATCH 3/3] rcutorture: Remove redundant assignment to cur_ops in for loop Josh Triplett
  0 siblings, 2 replies; 7+ messages in thread
From: Josh Triplett @ 2007-02-07 18:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ahmed S. Darwish, linux-kernel

Replace open-coded array size calculation with standard ARRAY_SIZE macro.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Josh Triplett <josh@kernel.org>
---
 kernel/rcutorture.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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);

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-08  1:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-07 18:54 [PATCH 1/3] rcutorture: Use ARRAY_SIZE macro when appropriate Josh Triplett
2007-02-07 18:56 ` [PATCH 2/3] rcutorture: style cleanup: avoid != NULL in boolean tests Josh Triplett
2007-02-07 18:57 ` [PATCH 3/3] rcutorture: Remove redundant assignment to cur_ops in for loop Josh Triplett
2007-02-07 23:56   ` Richard Knutsson
2007-02-08  0:22     ` Andrew Morton
2007-02-08  0:24       ` Andrew Morton
2007-02-08  1:42         ` Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).