public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
To: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: "linaro-acpi@lists.linaro.org" <linaro-acpi@lists.linaro.org>,
	linux-acpi@vger.kernel.org, rjw@rjwysocki.net,
	Len Brown <lenb@kernel.org>
Subject: Re: [Linaro-acpi] [RFC] ACPI: Add new function to get table entries
Date: Thu, 20 Mar 2014 14:48:37 +0100	[thread overview]
Message-ID: <532AF1B5.7050409@linaro.org> (raw)
In-Reply-To: <CAJ5Y-eaw4PbBMerXQXjzuiW=wB8G6bJe8QmCxmUW_ya9+iun1Q@mail.gmail.com>

On 20.03.2014 14:25, Ashwin Chaugule wrote:
> Hi Tomasz,
>
> On 20 March 2014 06:05, Tomasz Nowicki <tomasz.nowicki@linaro.org> wrote:
>
>>> +       if (!table_size)
>>> +               table_size = table_header->length;
>>> +
>>
>>
>> If table_size == 0, that would causes 'entry' and 'table_end' are equal and
>> no entries at all. For that case I would suggest to print error and return.
>>
>
> Hm. tbl_size and table_header->length are not the same. This needs to
> be revisited.
Indeed, table_size is used to find out where entry list starts.
table_header->length in turn, is used to find out end of entry list. If 
we pass table_size = 0, then we will parse none of entries.
>
>
>>
>> Changelog is saying that acpi_parse_entries() takes already mapped table and
>> parses entries. IMO, caller should takes care about unmapping table. It can
>> be still parsed using different ID later on.
>>
>
> Although I generally agree that mapping/umapping should be done in the
> caller, it seems umapping in this manner is baked in APCI core code
> and I didn't want to change too many things at once without causing
> unintentional side effects elsewhere.

You will not cause any side effects if unmapping will stay in 
acpi_table_parse_entries().

Tomasz

  reply	other threads:[~2014-03-20 13:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 23:09 [RFC] ACPI: Add new function to get table entries Ashwin Chaugule
2014-03-20  8:25 ` [Linaro-acpi] " Hanjun Guo
2014-03-20 13:17   ` Ashwin Chaugule
2014-03-20 10:05 ` Tomasz Nowicki
2014-03-20 10:16   ` Tomasz Nowicki
2014-03-20 13:27     ` Ashwin Chaugule
2014-03-20 14:06       ` Tomasz Nowicki
2014-03-20 14:39         ` Ashwin Chaugule
2014-03-20 14:59           ` Tomasz Nowicki
2014-03-20 13:25   ` Ashwin Chaugule
2014-03-20 13:48     ` Tomasz Nowicki [this message]
2014-03-20 13:53       ` Ashwin Chaugule
2014-03-20 14:06         ` Tomasz Nowicki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=532AF1B5.7050409@linaro.org \
    --to=tomasz.nowicki@linaro.org \
    --cc=ashwin.chaugule@linaro.org \
    --cc=lenb@kernel.org \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox