apic: moved declaration outside of switch statement
This commit is contained in:
parent
e59763a078
commit
f4f4d3150e
1 changed files with 3 additions and 1 deletions
|
|
@ -45,9 +45,11 @@ int madt_parse_next_entry(int offset)
|
||||||
printf(LOG_INFO "MADT Entry %d: %s\n", n_madt_entries,
|
printf(LOG_INFO "MADT Entry %d: %s\n", n_madt_entries,
|
||||||
madt_entry_types[type]);
|
madt_entry_types[type]);
|
||||||
|
|
||||||
|
/* Can't declare variables inside switch statement */
|
||||||
|
struct madt_lapic *lapic = (struct madt_lapic *)madt;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case MADT_LAPIC:
|
case MADT_LAPIC:
|
||||||
struct madt_lapic *lapic = (struct madt_lapic *)madt;
|
|
||||||
printf(LOG_INFO "Lapic base address for cpu %d: %xh\n",
|
printf(LOG_INFO "Lapic base address for cpu %d: %xh\n",
|
||||||
lapic->acpi_cpu_id, __madt->lapic_addr);
|
lapic->acpi_cpu_id, __madt->lapic_addr);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue