From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Nowicki Subject: Re: [Linaro-acpi] [RFC] ACPI: Add new function to get table entries Date: Thu, 20 Mar 2014 15:06:33 +0100 Message-ID: <532AF5E9.2090208@linaro.org> References: <1395270568-30021-1-git-send-email-ashwin.chaugule@linaro.org> <532ABD83.9020003@linaro.org> <532ABFF2.6080103@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f173.google.com ([74.125.82.173]:55103 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757966AbaCTOFw (ORCPT ); Thu, 20 Mar 2014 10:05:52 -0400 Received: by mail-we0-f173.google.com with SMTP id w61so627590wes.4 for ; Thu, 20 Mar 2014 07:05:51 -0700 (PDT) In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Ashwin Chaugule Cc: "linaro-acpi@lists.linaro.org" , linux-acpi@vger.kernel.org, rjw@rjwysocki.net, Len Brown On 20.03.2014 14:27, Ashwin Chaugule wrote: > On 20 March 2014 06:16, Tomasz Nowicki wrote: > >>>> + return acpi_parse_entries(table_header->length, handler, >>>> table_header, >>>> + entry_id, max_entries); >> >> Also, first argument of acpi_parse_entries() expect subtable start point >> offset, but now it points to the end of table. >> > > > Not sure what you mean. First arg of acpi_parse_entries expects > table_size, not an offset. As I mentioned in previous mail, first args of acpi_parse_entries will lead us to first MADT entry list. By passing table_header->length we will get at the end of MADT entry list. IMO, we should use table_size (snd argument of acpi_table_parse_entries()) instead of table_header->length. Tomasz