Skip to content

Commit 9b09927

Browse files
andy-shevKAGA-KOKO
authored andcommitted
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 <andriy.shevchenko@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20221124184824.9548-1-andriy.shevchenko@linux.intel.com
1 parent e399843 commit 9b09927

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

arch/x86/kernel/devicetree.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ char __initdata cmd_line[COMMAND_LINE_SIZE];
3131

3232
int __initdata of_ioapic;
3333

34-
void __init early_init_dt_add_memory_arch(u64 base, u64 size)
35-
{
36-
BUG();
37-
}
38-
3934
void __init add_dtb(u64 data)
4035
{
4136
initial_dtb = data + offsetof(struct setup_data, data);

0 commit comments

Comments
 (0)