diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:30 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:30 -0400 |
commit | 19f03ffecdb599c1f64113b6dda0a1f143d2bab9 (patch) | |
tree | 3b482484508fd378cf27682c69699413f419fd28 /arch | |
parent | efec3b9a3282714c8441b9bf476f8358bed9ecaa (diff) |
[PATCH] i386: Clean up code style in mpparse.c ACPI code
Remove some unlinuxy ways to write function parameter definitions.
Remove some stray "return;"s
No functional change.
Cc: len.brown@intel.com
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/mpparse.c | 52 |
1 files changed, 17 insertions, 35 deletions
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index a2b126fe9a54..bdaa75a5bc1c 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -810,8 +810,7 @@ int es7000_plat; | |||
810 | 810 | ||
811 | #ifdef CONFIG_ACPI | 811 | #ifdef CONFIG_ACPI |
812 | 812 | ||
813 | void __init mp_register_lapic_address ( | 813 | void __init mp_register_lapic_address(u64 address) |
814 | u64 address) | ||
815 | { | 814 | { |
816 | mp_lapic_addr = (unsigned long) address; | 815 | mp_lapic_addr = (unsigned long) address; |
817 | 816 | ||
@@ -823,13 +822,10 @@ void __init mp_register_lapic_address ( | |||
823 | Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); | 822 | Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); |
824 | } | 823 | } |
825 | 824 | ||
826 | 825 | void __devinit mp_register_lapic (u8 id, u8 enabled) | |
827 | void __devinit mp_register_lapic ( | ||
828 | u8 id, | ||
829 | u8 enabled) | ||
830 | { | 826 | { |
831 | struct mpc_config_processor processor; | 827 | struct mpc_config_processor processor; |
832 | int boot_cpu = 0; | 828 | int boot_cpu = 0; |
833 | 829 | ||
834 | if (MAX_APICS - id <= 0) { | 830 | if (MAX_APICS - id <= 0) { |
835 | printk(KERN_WARNING "Processor #%d invalid (max %d)\n", | 831 | printk(KERN_WARNING "Processor #%d invalid (max %d)\n", |
@@ -866,11 +862,9 @@ static struct mp_ioapic_routing { | |||
866 | u32 pin_programmed[4]; | 862 | u32 pin_programmed[4]; |
867 | } mp_ioapic_routing[MAX_IO_APICS]; | 863 | } mp_ioapic_routing[MAX_IO_APICS]; |
868 | 864 | ||
869 | 865 | static int mp_find_ioapic (int gsi) | |
870 | static int mp_find_ioapic ( | ||
871 | int gsi) | ||
872 | { | 866 | { |
873 | int i = 0; | 867 | int i = 0; |
874 | 868 | ||
875 | /* Find the IOAPIC that manages this GSI. */ | 869 | /* Find the IOAPIC that manages this GSI. */ |
876 | for (i = 0; i < nr_ioapics; i++) { | 870 | for (i = 0; i < nr_ioapics; i++) { |
@@ -883,15 +877,11 @@ static int mp_find_ioapic ( | |||
883 | 877 | ||
884 | return -1; | 878 | return -1; |
885 | } | 879 | } |
886 | |||
887 | 880 | ||
888 | void __init mp_register_ioapic ( | 881 | void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base) |
889 | u8 id, | ||
890 | u32 address, | ||
891 | u32 gsi_base) | ||
892 | { | 882 | { |
893 | int idx = 0; | 883 | int idx = 0; |
894 | int tmpid; | 884 | int tmpid; |
895 | 885 | ||
896 | if (nr_ioapics >= MAX_IO_APICS) { | 886 | if (nr_ioapics >= MAX_IO_APICS) { |
897 | printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " | 887 | printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " |
@@ -937,16 +927,10 @@ void __init mp_register_ioapic ( | |||
937 | mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, | 927 | mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, |
938 | mp_ioapic_routing[idx].gsi_base, | 928 | mp_ioapic_routing[idx].gsi_base, |
939 | mp_ioapic_routing[idx].gsi_end); | 929 | mp_ioapic_routing[idx].gsi_end); |
940 | |||
941 | return; | ||
942 | } | 930 | } |
943 | 931 | ||
944 | 932 | void __init | |
945 | void __init mp_override_legacy_irq ( | 933 | mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) |
946 | u8 bus_irq, | ||
947 | u8 polarity, | ||
948 | u8 trigger, | ||
949 | u32 gsi) | ||
950 | { | 934 | { |
951 | struct mpc_config_intsrc intsrc; | 935 | struct mpc_config_intsrc intsrc; |
952 | int ioapic = -1; | 936 | int ioapic = -1; |
@@ -984,15 +968,13 @@ void __init mp_override_legacy_irq ( | |||
984 | mp_irqs[mp_irq_entries] = intsrc; | 968 | mp_irqs[mp_irq_entries] = intsrc; |
985 | if (++mp_irq_entries == MAX_IRQ_SOURCES) | 969 | if (++mp_irq_entries == MAX_IRQ_SOURCES) |
986 | panic("Max # of irq sources exceeded!\n"); | 970 | panic("Max # of irq sources exceeded!\n"); |
987 | |||
988 | return; | ||
989 | } | 971 | } |
990 | 972 | ||
991 | void __init mp_config_acpi_legacy_irqs (void) | 973 | void __init mp_config_acpi_legacy_irqs (void) |
992 | { | 974 | { |
993 | struct mpc_config_intsrc intsrc; | 975 | struct mpc_config_intsrc intsrc; |
994 | int i = 0; | 976 | int i = 0; |
995 | int ioapic = -1; | 977 | int ioapic = -1; |
996 | 978 | ||
997 | /* | 979 | /* |
998 | * Fabricate the legacy ISA bus (bus #31). | 980 | * Fabricate the legacy ISA bus (bus #31). |
@@ -1061,12 +1043,12 @@ void __init mp_config_acpi_legacy_irqs (void) | |||
1061 | 1043 | ||
1062 | #define MAX_GSI_NUM 4096 | 1044 | #define MAX_GSI_NUM 4096 |
1063 | 1045 | ||
1064 | int mp_register_gsi (u32 gsi, int triggering, int polarity) | 1046 | int mp_register_gsi(u32 gsi, int triggering, int polarity) |
1065 | { | 1047 | { |
1066 | int ioapic = -1; | 1048 | int ioapic = -1; |
1067 | int ioapic_pin = 0; | 1049 | int ioapic_pin = 0; |
1068 | int idx, bit = 0; | 1050 | int idx, bit = 0; |
1069 | static int pci_irq = 16; | 1051 | static int pci_irq = 16; |
1070 | /* | 1052 | /* |
1071 | * Mapping between Global System Interrups, which | 1053 | * Mapping between Global System Interrups, which |
1072 | * represent all possible interrupts, and IRQs | 1054 | * represent all possible interrupts, and IRQs |