>>> On 23.01.16 at 10:20, <zhaoshengl...@huawei.com> wrote: > From: Shannon Zhao <shannon.z...@linaro.org> > > This function could get the specified index entry of MADT table. This > would be useful when it needs to get the contens of the entry. > > Cc: Jan Beulich <jbeul...@suse.com> > Signed-off-by: Shannon Zhao <shannon.z...@linaro.org>
Again - if this is the counterpart to a Linux side change, please name that change. If it isn't, besides needing a better explanation of why you need it whether neither Linux nor x86 Xen does is needed, and a few code issues would need to be addressed too: Pointer type function parameters should be constified as much as possible, use of plain int should be avoided unless you truly need a signed type, and ... > +struct acpi_subtable_header * __init > +acpi_table_get_entry_madt(enum acpi_madt_type id, unsigned int entry_index) > +{ > + struct acpi_table_header *table_header = NULL; > + > + acpi_get_table(ACPI_SIG_MADT, acpi_apic_instance, &table_header); > + if (!table_header) { ... you should use the return value of the function instead of pre- setting table_header to NULL and then checking whether it changed. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel