Commit a5126d7d authored by Len Brown's avatar Len Brown

Delete (void)func() casts considered cruft in Linux style.

GCC's inability to warn when return values are ignored has conditioned
Linux programmers into thinking that this is actually normal.

delete some #define's -- suggested by Matt Wilcox
parent ef08f522
...@@ -128,7 +128,9 @@ static int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) ...@@ -128,7 +128,9 @@ static int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
return 0; return 0;
} }
#endif /* CONFIG_PCI_MMCONFIG */ #else
#define acpi_parse_mcfg NULL
#endif /* !CONFIG_PCI_MMCONFIG */
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
static int __init static int __init
...@@ -424,6 +426,8 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) ...@@ -424,6 +426,8 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
hpet_address); hpet_address);
return 0; return 0;
} }
#else
#define acpi_parse_hpet NULL
#endif #endif
unsigned long __init unsigned long __init
...@@ -635,7 +639,7 @@ acpi_boot_init (void) ...@@ -635,7 +639,7 @@ acpi_boot_init (void)
return error; return error;
} }
(void) acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); acpi_table_parse(ACPI_BOOT, acpi_parse_sbf);
/* /*
* blacklist may disable ACPI entirely * blacklist may disable ACPI entirely
...@@ -652,15 +656,9 @@ acpi_boot_init (void) ...@@ -652,15 +656,9 @@ acpi_boot_init (void)
*/ */
acpi_process_madt(); acpi_process_madt();
#ifdef CONFIG_HPET_TIMER acpi_table_parse(ACPI_HPET, acpi_parse_hpet);
(void) acpi_table_parse(ACPI_HPET, acpi_parse_hpet);
#endif
#ifdef CONFIG_PCI_MMCONFIG acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
error = acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
if (error)
printk(KERN_ERR PREFIX "Error %d parsing MCFG\n", error);
#endif
return 0; return 0;
} }
......
...@@ -386,8 +386,13 @@ acpi_table_parse ( ...@@ -386,8 +386,13 @@ acpi_table_parse (
for (i = 0; i < sdt_count; i++) { for (i = 0; i < sdt_count; i++) {
if (sdt_entry[i].id != id) if (sdt_entry[i].id != id)
continue; continue;
handler(sdt_entry[i].pa, sdt_entry[i].size);
count++; count++;
if (count == 1)
handler(sdt_entry[i].pa, sdt_entry[i].size);
else
printk(KERN_WARNING PREFIX "%d duplicate %s table ignored.\n",
count, acpi_table_signatures[id]);
} }
return count; return count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment