x86: mpparse: clean up code by introducing a few helper functions, fix
authorIngo Molnar <mingo@elte.hu>
Thu, 19 Mar 2009 07:50:35 +0000 (08:50 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 19 Mar 2009 07:52:13 +0000 (08:52 +0100)
Impact: fix boot crash

This fixes commit a6830278568a8bb9758aac152db15187741e0113.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1237403503.22438.21.camel@ht.satnam>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/mpparse.c

index 58ddf6259afb10a467ff47f45fc9a43f42d5c32f..290cb57f46973a548c50f5e5c1f7a881dd4ebe67 100644 (file)
@@ -319,23 +319,23 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
                case MP_PROCESSOR:
                        /* ACPI may have already provided this data */
                        if (!acpi_lapic)
-                               MP_processor_info((struct mpc_cpu *)&mpt);
+                               MP_processor_info((struct mpc_cpu *)mpt);
                        skip_entry(&mpt, &count, sizeof(struct mpc_cpu));
                        break;
                case MP_BUS:
-                       MP_bus_info((struct mpc_bus *)&mpt);
+                       MP_bus_info((struct mpc_bus *)mpt);
                        skip_entry(&mpt, &count, sizeof(struct mpc_bus));
                        break;
                case MP_IOAPIC:
-                       MP_ioapic_info((struct mpc_ioapic *)&mpt);
+                       MP_ioapic_info((struct mpc_ioapic *)mpt);
                        skip_entry(&mpt, &count, sizeof(struct mpc_ioapic));
                        break;
                case MP_INTSRC:
-                       MP_intsrc_info((struct mpc_intsrc *)&mpt);
+                       MP_intsrc_info((struct mpc_intsrc *)mpt);
                        skip_entry(&mpt, &count, sizeof(struct mpc_intsrc));
                        break;
                case MP_LINTSRC:
-                       MP_lintsrc_info((struct mpc_lintsrc *)&mpt);
+                       MP_lintsrc_info((struct mpc_lintsrc *)mpt);
                        skip_entry(&mpt, &count, sizeof(struct mpc_lintsrc));
                        break;
                default:
@@ -902,7 +902,7 @@ static int  __init replace_intsrc_all(struct mpc_table *mpc,
                        skip_entry(&mpt, &count, sizeof(struct mpc_ioapic));
                        break;
                case MP_INTSRC:
-                       check_irq_src((struct mpc_intsrc *)&mpt, &nr_m_spare);
+                       check_irq_src((struct mpc_intsrc *)mpt, &nr_m_spare);
                        skip_entry(&mpt, &count, sizeof(struct mpc_intsrc));
                        break;
                case MP_LINTSRC: