From: Andy Shevchenko Date: Thu, 24 Nov 2022 18:48:24 +0000 (+0200) Subject: x86/of: Remove unused early_init_dt_add_memory_arch() X-Git-Tag: v6.2-rc1~193^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b09927c0cdec4d4e75f7f9e621eaec179a888fd;p=thirdparty%2Fkernel%2Flinux.git x86/of: Remove unused early_init_dt_add_memory_arch() Recently objtool started complaining about dead code in the object files, in particular vmlinux.o: warning: objtool: early_init_dt_scan_memory+0x191: unreachable instruction when CONFIG_OF=y. Indeed, early_init_dt_scan() is not used on x86 and making it compile (with help of CONFIG_OF) will abrupt the code flow since in the middle of it there is a BUG() instruction. Remove the pointless function. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221124184824.9548-1-andriy.shevchenko@linux.intel.com --- diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 5cd51f25f4461..59438d2b204cc 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -31,11 +31,6 @@ char __initdata cmd_line[COMMAND_LINE_SIZE]; int __initdata of_ioapic; -void __init early_init_dt_add_memory_arch(u64 base, u64 size) -{ - BUG(); -} - void __init add_dtb(u64 data) { initial_dtb = data + offsetof(struct setup_data, data);