Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932927AbXBFQGO (ORCPT ); Tue, 6 Feb 2007 11:06:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932922AbXBFQGO (ORCPT ); Tue, 6 Feb 2007 11:06:14 -0500 Received: from nz-out-0506.google.com ([64.233.162.229]:58148 "EHLO nz-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932965AbXBFQFw (ORCPT ); Tue, 6 Feb 2007 11:05:52 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:subject:message-id:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; b=sD4IwDEQoVTbYZbjN32sj6JraOuChOmDpzOdcZy6vK4qWXyKGET1KRaHuH22svyoAohsWUdDmiXnUFvdMeFNNzfPrRQVkkyLej3G5eEnOnKR0bP6rcm/37Uq7LfPVr/rT1l2QQHXFosQO3gqrUb5LE2K1wcmSJ5fCMgouNrRF1k= Date: Tue, 6 Feb 2007 18:05:39 +0200 To: linux-kernel@vger.kernel.org Subject: [PATCH 2.6.20 2/2] OSS: Use ARRAY_SIZE macro when appropriate Message-ID: <20070206160539.GG8991@Ahmed> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070206160204.GA8991@Ahmed> User-Agent: Mutt/1.5.11 From: "Ahmed S. Darwish" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2864 Lines: 79 Hi all, A patch to use ARRAY_SIZE macro already defined in kernel.h Signed-off-by: Ahmed S. Darwish --- I couldn't compile-test this patch with `allyesconfig' or `allmodconfig'. au1550_ac97.c | 4 ++-- nec_vrc5477.c | 4 ++-- swarm_cs4297a.c | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index 2197951..a339f0c 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c @@ -1354,11 +1354,11 @@ au1550_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ((file->f_mode & FMODE_READ) && s->dma_adc.mapped); #ifdef DEBUG - for (count=0; count #include #include +#include #include #include @@ -2676,7 +2677,7 @@ static int __init cs4297a_init(void) #if 0 val = SOUND_MASK_LINE; mixer_ioctl(s, SOUND_MIXER_WRITE_RECSRC, (unsigned long) &val); - for (i = 0; i < sizeof(initvol) / sizeof(initvol[0]); i++) { + for (i = 0; i < ARRAY_SIZE(initvol); i++) { val = initvol[i].vol; mixer_ioctl(s, initvol[i].mixch, (unsigned long) &val); } -- Ahmed S. Darwish http://darwish-07.blogspot.com - 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/