x86/boot/acpi: Move get_cmdline_acpi_rsdp() under #ifdef guard
authorZhenzhong Duan <zhenzhong.duan@oracle.com>
Sun, 29 Sep 2019 01:13:52 +0000 (09:13 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 18 Oct 2019 11:33:38 +0000 (13:33 +0200)
commit228d120051a2234356690924c1f42e07e54e1eaf
treeccf22b05d4eb5888b42c16642a3d3ce36c0c664b
parentf7c0f50f1857c1cf013466fcea4dc98d116bf456
x86/boot/acpi: Move get_cmdline_acpi_rsdp() under #ifdef guard

When building with "EXTRA_CFLAGS=-Wall" gcc warns:

arch/x86/boot/compressed/acpi.c:29:30: warning: get_cmdline_acpi_rsdp defined but not used [-Wunused-function]

get_cmdline_acpi_rsdp() is only used when CONFIG_RANDOMIZE_BASE and
CONFIG_MEMORY_HOTREMOVE are both enabled, so any build where one of these
config options is disabled has this issue.

Move the function under the same ifdef guard as the call site.

[ tglx: Add context to the changelog so it becomes useful ]

Fixes: 41fa1ee9c6d6 ("acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1569719633-32164-1-git-send-email-zhenzhong.duan@oracle.com
arch/x86/boot/compressed/acpi.c