Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761330Ab0GTPKP (ORCPT ); Tue, 20 Jul 2010 11:10:15 -0400 Received: from cantor.suse.de ([195.135.220.2]:33212 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758534Ab0GTPKM (ORCPT ); Tue, 20 Jul 2010 11:10:12 -0400 Date: Tue, 20 Jul 2010 17:10:10 +0200 (CEST) From: Jiri Kosina To: Kulikov Vasiliy Cc: Kernel Janitors , Jing Huang , "James E.J. Bottomley" , Krishna Gudipati , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/16] trivial: use ARRAY_SIZE In-Reply-To: <1277726105-24600-1-git-send-email-segooon@gmail.com> Message-ID: References: <1277726105-24600-1-git-send-email-segooon@gmail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1074 Lines: 33 On Mon, 28 Jun 2010, Kulikov Vasiliy wrote: > Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x). > > Signed-off-by: Kulikov Vasiliy > --- > drivers/scsi/bfa/bfa_core.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c > index 3a7b3f8..d845506 100644 > --- a/drivers/scsi/bfa/bfa_core.c > +++ b/drivers/scsi/bfa/bfa_core.c > @@ -335,7 +335,7 @@ bfa_get_pciids(struct bfa_pciid_s **pciids, int *npciids) > {BFA_PCI_VENDOR_ID_BROCADE, BFA_PCI_DEVICE_ID_CT}, > }; > > - *npciids = sizeof(__pciids) / sizeof(__pciids[0]); > + *npciids = ARRAY_SIZE(__pciids); > *pciids = __pciids; > } Doesn't seem to be in linux-next as of today. I have applied the patch to trivial queue. -- Jiri Kosina SUSE Labs, Novell Inc. -- 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/