Re: [PATCH v2] x86/boot/KASLR: Fix unused variable warning
From: Borislav Petkov
Date: Fri Jan 24 2020 - 06:43:22 EST
On Mon, Jan 13, 2020 at 10:43:14AM +0800, Zhenzhong Duan wrote:
> Just tried Arvind's patch, result is not that bad. Below are all
> warnings during build:
> In fact, only gop.c and kaslr.c have compile warning.
gop.c is not part of arch/x86/boot/compressed/
So I'd take a patch adding -Wunused to arch/x86/boot/compressed/Makefile
and fixing the single warning in kaslr.c
The extrawarn W=1 stuff gives a lot more (below) and there I guess I'd
take only well thought out patches, each fixing all -Wmissing-prototypes
in a single compilation unit.
In file included from arch/x86/boot/compressed/string.c:11:
arch/x86/boot/compressed/../string.c:43:5: warning: no previous prototype for âbcmpâ [-Wmissing-prototypes]
arch/x86/boot/compressed/../string.c:146:6: warning: no previous prototype for âsimple_strtolâ [-Wmissing-prototypes]
arch/x86/boot/compressed/string.c:53:7: warning: no previous prototype for âmemmoveâ [-Wmissing-prototypes]
In file included from arch/x86/boot/compressed/string.c:11:
arch/x86/boot/compressed/../string.c:43:5: warning: no previous prototype for âbcmpâ [-Wmissing-prototypes]
arch/x86/boot/compressed/../string.c:146:6: warning: no previous prototype for âsimple_strtolâ [-Wmissing-prototypes]
arch/x86/boot/compressed/string.c:53:7: warning: no previous prototype for âmemmoveâ [-Wmissing-prototypes]
In file included from arch/x86/boot/compressed/cmdline.c:14:
arch/x86/boot/compressed/../cmdline.c:28:5: warning: no previous prototype for â__cmdline_find_optionâ [-Wmissing-prototypes]
arch/x86/boot/compressed/../cmdline.c:100:5: warning: no previous prototype for â__cmdline_find_option_boolâ [-Wmissing-prototypes]
arch/x86/boot/compressed/cmdline.c:15:15: warning: no previous prototype for âget_cmd_line_ptrâ [-Wmissing-prototypes]
arch/x86/boot/compressed/eboot.c:26:28: warning: no previous prototype for âefi_system_tableâ [-Wmissing-prototypes]
arch/x86/boot/compressed/eboot.c:318:6: warning: no previous prototype for âsetup_graphicsâ [-Wmissing-prototypes]
arch/x86/boot/compressed/eboot.c:357:23: warning: no previous prototype for âefi_pe_entryâ [-Wmissing-prototypes]
arch/x86/boot/compressed/pgtable_64.c:110:22: warning: no previous prototype for âpaging_prepareâ [-Wmissing-prototypes]
arch/x86/boot/compressed/pgtable_64.c:193:6: warning: no previous prototype for âcleanup_trampolineâ [-Wmissing-prototypes]
arch/x86/boot/compressed/eboot.c:711:21: warning: no previous prototype for âefi_mainâ [-Wmissing-prototypes]
arch/x86/boot/compressed/misc.c:340:28: warning: no previous prototype for âextract_kernelâ [-Wmissing-prototypes]
...
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette