On 20.03.2014 14:25, Ashwin Chaugule wrote:
Hi Tomasz,
On 20 March 2014 06:05, Tomasz Nowicki <tomasz.nowicki@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html