All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Ahmed S. Darwish" <darwish.07@gmail.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] rcutorture: Use ARRAY_SIZE macro when appropriate
Date: Wed, 07 Feb 2007 10:54:36 -0800	[thread overview]
Message-ID: <45CA206C.2080205@kernel.org> (raw)

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

             reply	other threads:[~2007-02-07 18:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07 18:54 Josh Triplett [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45CA206C.2080205@kernel.org \
    --to=josh@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=darwish.07@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.