Skip to content

Commit 6c3ca66

Browse files
seehearfeelchenhuacai
authored andcommitted
LoongArch: Remove CONFIG_ACPI_TABLE_UPGRADE in platform_init()
Both acpi_table_upgrade() and acpi_boot_table_init() are defined as empty functions under !CONFIG_ACPI_TABLE_UPGRADE and !CONFIG_ACPI in include/linux/acpi.h, there are no implicit declaration errors with various configs. #ifdef CONFIG_ACPI_TABLE_UPGRADE void acpi_table_upgrade(void); #else static inline void acpi_table_upgrade(void) { } #endif #ifdef CONFIG_ACPI ... void acpi_boot_table_init (void); ... #else /* !CONFIG_ACPI */ ... static inline void acpi_boot_table_init(void) { } ... #endif /* !CONFIG_ACPI */ As Huacai suggested, CONFIG_ACPI_TABLE_UPGRADE is ugly and not necessary here, just remove it. At the same time, just keep CONFIG_ACPI to prevent potential build errors in future, and give a signal to indicate the code is ACPI-specific. For the same reason, we also put acpi_table_upgrade() under CONFIG_ACPI. Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent c3f38fa commit 6c3ca66

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/loongarch/kernel/setup.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,8 @@ void __init platform_init(void)
351351
arch_reserve_vmcore();
352352
arch_reserve_crashkernel();
353353

354-
#ifdef CONFIG_ACPI_TABLE_UPGRADE
355-
acpi_table_upgrade();
356-
#endif
357354
#ifdef CONFIG_ACPI
355+
acpi_table_upgrade();
358356
acpi_gbl_use_default_register_widths = false;
359357
acpi_boot_table_init();
360358
#endif

0 commit comments

Comments
 (0)