>>> On 24.11.15 at 04:08, <zhaoshengl...@huawei.com> wrote:
> On 2015/11/24 0:59, Jan Beulich wrote:
>>>>> On 17.11.15 at 10:40, <shannon.z...@linaro.org> wrote:
>>> +   if ( !table_header )
>>> +   {
>>> +           printk("Table header not present\n");
>>> +           return NULL;
>>> +   }
>>> +
>>> +   table_end = (unsigned long)table_header + table_header->length;
>> 
>> So here you use ->length, ...
>> 
>>> +   /* Parse all entries looking for a match. */
>>> +   entry = (struct acpi_subtable_header *)
>>> +       ((unsigned long)table_header + table_size);
>> 
>> ... but here table_size. Why?
>> 
> Here it just skips the main table size at the beginning. Then it could
> point to the start of sub-table.
> For example, to MADT table, the table_size is sizeof(struct
> acpi_table_madt).

Well, but for one then the parameter name is kind of wrong, and
second - is it really reasonable for the caller to tell the function?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to