Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86, boot: Remove multiple copy of static function sanitize_boot_params()

Kernel build warns:
'sanitize_boot_params' defined but not used [-Wunused-function]

at below files:
arch/x86/boot/compressed/cmdline.c
arch/x86/boot/compressed/error.c
arch/x86/boot/compressed/early_serial_console.c
arch/x86/boot/compressed/acpi.c

That's becausethey each include misc.h which includes a definition of
sanitize_boot_params() via bootparam_utils.h.

Remove the inclusion from misc.h and have the c file including
bootparam_utils.h directly.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1563283092-1189-1-git-send-email-zhenzhong.duan@oracle.com

authored by

Zhenzhong Duan and committed by
Thomas Gleixner
8c5477e8 449f3286

+1 -1
+1
arch/x86/boot/compressed/misc.c
··· 17 17 #include "pgtable.h" 18 18 #include "../string.h" 19 19 #include "../voffset.h" 20 + #include <asm/bootparam_utils.h> 20 21 21 22 /* 22 23 * WARNING!!
-1
arch/x86/boot/compressed/misc.h
··· 23 23 #include <asm/page.h> 24 24 #include <asm/boot.h> 25 25 #include <asm/bootparam.h> 26 - #include <asm/bootparam_utils.h> 27 26 28 27 #define BOOT_CTYPE_H 29 28 #include <linux/acpi.h>