Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422768AbXBGSyl (ORCPT ); Wed, 7 Feb 2007 13:54:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422800AbXBGSyl (ORCPT ); Wed, 7 Feb 2007 13:54:41 -0500 Received: from mail8.sea5.speakeasy.net ([69.17.117.10]:33029 "EHLO mail8.sea5.speakeasy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422768AbXBGSyj (ORCPT ); Wed, 7 Feb 2007 13:54:39 -0500 Message-ID: <45CA206C.2080205@kernel.org> Date: Wed, 07 Feb 2007 10:54:36 -0800 From: Josh Triplett User-Agent: Icedove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: Andrew Morton CC: "Ahmed S. Darwish" , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] rcutorture: Use ARRAY_SIZE macro when appropriate Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1000 Lines: 26 Replace open-coded array size calculation with standard ARRAY_SIZE macro. Signed-off-by: Ahmed S. Darwish Signed-off-by: Josh Triplett --- 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); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/