[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 10/21] acpi/table: Introduce acpi_table_get_entry_madt to get specified entry
>>> On 23.01.16 at 10:20, <zhaoshenglong@xxxxxxxxxx> wrote: > From: Shannon Zhao <shannon.zhao@xxxxxxxxxx> > > 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 <jbeulich@xxxxxxxx> > Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx> 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@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |