Re: [Patch v4 05/16] ACPI: Add interfaces to parse IOAPIC ID for IOAPIC hotplug

2014-09-09 Thread Jiang Liu
On 2014/9/9 18:54, Thomas Gleixner wrote: > On Thu, 28 Aug 2014, Jiang Liu wrote: >> >> +static struct acpi_table_madt *madt; >> +static int read_madt; > > Pretty lousy file visible variable names. > > So we end up with two copies of the butt ugly > >if (!read_madt) { > . >

Re: [Patch v4 05/16] ACPI: Add interfaces to parse IOAPIC ID for IOAPIC hotplug

2014-09-09 Thread Thomas Gleixner
On Thu, 28 Aug 2014, Jiang Liu wrote: > > +static struct acpi_table_madt *madt; > +static int read_madt; Pretty lousy file visible variable names. So we end up with two copies of the butt ugly if (!read_madt) { . } stuff instead of creating a helper function which hides that

[Patch v4 05/16] ACPI: Add interfaces to parse IOAPIC ID for IOAPIC hotplug

2014-08-27 Thread Jiang Liu
From: Yinghai Lu We need to parse APIC ID for IOAPIC registration for IOAPIC hotplug. ACPI _MAT method and MADT table are used to figure out IOAPIC ID, just like parsing CPU APIC ID for CPU hotplug. Signed-off-by: Yinghai Lu Signed-off-by: Jiang Liu --- drivers/acpi/apic_id.c | 96 +