From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hanjun Guo Subject: Re: [PATCH 1/2] ACPI / table: Add new function to get table entries Date: Thu, 27 Nov 2014 08:29:34 +0800 Message-ID: <5476706E.7080906@linaro.org> References: <1417010474-2399-1-git-send-email-hanjun.guo@linaro.com> <3690114.UPTfuA83uf@vostro.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pa0-f50.google.com ([209.85.220.50]:47958 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836AbaK0Abn (ORCPT ); Wed, 26 Nov 2014 19:31:43 -0500 Received: by mail-pa0-f50.google.com with SMTP id bj1so3848266pad.37 for ; Wed, 26 Nov 2014 16:31:42 -0800 (PST) In-Reply-To: <3690114.UPTfuA83uf@vostro.rjw.lan> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org, Ashwin Chaugule , Tomasz Nowicki On 2014-11-27 6:14, Rafael J. Wysocki wrote: > On Wednesday, November 26, 2014 10:01:13 PM Hanjun Guo wrote: >> From: Ashwin Chaugule >> >> The acpi_table_parse() function has a callback that >> passes a pointer to a table_header. Add a new function >> which takes this pointer and parses its entries. This >> eliminates the need to re-traverse all the tables for >> each call. e.g. as in acpi_table_parse_madt() which is >> normally called after acpi_table_parse(). >> >> Acked-by: Grant Likely >> Signed-off-by: Ashwin Chaugule >> Signed-off-by: Tomasz Nowicki >> Signed-off-by: Hanjun Guo >> --- >> drivers/acpi/tables.c | 63 +++++++++++++++++++++++++++++++++++---------------- >> include/linux/acpi.h | 4 ++++ >> 2 files changed, 48 insertions(+), 19 deletions(-) >> >> diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c >> index 6d5a6cd..f1debe9 100644 >> --- a/drivers/acpi/tables.c >> +++ b/drivers/acpi/tables.c >> @@ -190,30 +190,24 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) >> } >> } >> >> - >> int __init >> -acpi_table_parse_entries(char *id, >> - unsigned long table_size, >> - int entry_id, >> - acpi_tbl_entry_handler handler, >> - unsigned int max_entries) >> +acpi_parse_entries(char *id, unsigned long table_size, > > Why isn't this static? Are you going to use it somewhere else? Yes, we will use it in the following patches to parse entries in static ACPI tables. Thanks Hanjun