From patchwork Sun Nov 1 22:36:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thiago Farina X-Patchwork-Id: 56916 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA1MasvI018342 for ; Sun, 1 Nov 2009 22:36:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753595AbZKAWgs (ORCPT ); Sun, 1 Nov 2009 17:36:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753543AbZKAWgs (ORCPT ); Sun, 1 Nov 2009 17:36:48 -0500 Received: from mail-yw0-f202.google.com ([209.85.211.202]:57637 "EHLO mail-yw0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753595AbZKAWgr (ORCPT ); Sun, 1 Nov 2009 17:36:47 -0500 Received: by ywh40 with SMTP id 40so4033221ywh.33 for ; Sun, 01 Nov 2009 14:36:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=oK836CsJJr+CcOfEF3tJ7VxTdpBMhiOVK62n+rMxByQ=; b=FM0lejhnhQRV/eaeudQs04vx6LFOpKvo5VQ7CM3gRp+abqdA35Llh7hcZMZPd20hSi 2vOa60Oact+EGmiubUWSZa63VCrxOTRvsSIM0RbiWIo8n1oR8gscsrEjTR4fodljCDkY ZxexpSM/MQSEK2OBytFQbbzlCcEflDskiyvag= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=IvxLtQzhs+DAx/rGnp+7+6jhZMDRpe+z9AmeOEXK0MW395Me4v9J1rbhx7frdblKUM 6u45slLW/LfDzL/y0dmaQ/61NHYy1NE16qyCreAfJg5skII08rMLiAfQ2FmnGWZzw70A iFPZ3CAFkexogfQx3slU7ei5AH2JQkfI6scPY= Received: by 10.90.10.40 with SMTP id 40mr8125995agj.85.1257115011878; Sun, 01 Nov 2009 14:36:51 -0800 (PST) Received: from localhost ([201.53.2.165]) by mx.google.com with ESMTPS id 15sm1147349yxh.40.2009.11.01.14.36.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 01 Nov 2009 14:36:51 -0800 (PST) From: Thiago Farina To: trivial@kernel.org Cc: lenb@kernel.org, ming.m.lin@intel.com, robert.moore@intel.com, jkosina@suze.cz, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Thiago Farina Subject: [PATCH] trivial: remove ACPI_ARRAY_LENGTH macro. Date: Sun, 1 Nov 2009 17:36:12 -0500 Message-Id: <1257114972-16039-1-git-send-email-tfransosi@gmail.com> X-Mailer: git-send-email 1.6.5.1.61.ge79999 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c index ec33f27..ca2eb02 100644 --- a/drivers/acpi/acpica/hwvalid.c +++ b/drivers/acpi/acpica/hwvalid.c @@ -103,7 +103,7 @@ static const struct acpi_port_info acpi_protected_ports[] = { {"PCI", 0x0CF8, 0x0CFF, ACPI_OSI_WIN_XP} }; -#define ACPI_PORT_INFO_ENTRIES ACPI_ARRAY_LENGTH (acpi_protected_ports) +#define ACPI_PORT_INFO_ENTRIES ARRAY_SIZE(acpi_protected_ports) /****************************************************************************** * diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c index 5d54e36..54efbaa 100644 --- a/drivers/acpi/acpica/uteval.c +++ b/drivers/acpi/acpica/uteval.c @@ -126,7 +126,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) /* Compare input string to static table of supported interfaces */ - for (i = 0; i < ACPI_ARRAY_LENGTH(acpi_interfaces_supported); i++) { + for (i = 0; i < ARRAY_SIZE(acpi_interfaces_supported); i++) { if (!ACPI_STRCMP(string_desc->string.pointer, acpi_interfaces_supported[i].name)) { /* @@ -186,7 +186,7 @@ acpi_status acpi_osi_invalidate(char *interface) { int i; - for (i = 0; i < ACPI_ARRAY_LENGTH(acpi_interfaces_supported); i++) { + for (i = 0; i < ARRAY_SIZE(acpi_interfaces_supported); i++) { if (!ACPI_STRCMP(interface, acpi_interfaces_supported[i].name)) { *acpi_interfaces_supported[i].name = '\0'; return AE_OK; diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 153f12d..641d746 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -441,10 +441,6 @@ typedef unsigned long long acpi_integer; #define ACPI_MIN(a,b) (((a)<(b))?(a):(b)) #define ACPI_MAX(a,b) (((a)>(b))?(a):(b)) -/* Size calculation */ - -#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) - /* Pointer manipulation */ #define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p))