diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-01-29 09:40:26 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-01-29 13:39:31 +0100 |
commit | c5231a57eb406c70a96f8e515abc49daa0af697b (patch) | |
tree | 94d995206e5ebdf508af3c1e39ea0ea81c01ec19 /arch/x86/boot/compressed/eboot.c | |
parent | 0c6fc11ac343c82d4a2f8348fa6f829e07c12554 (diff) | |
download | linux-c5231a57eb406c70a96f8e515abc49daa0af697b.tar.bz2 |
x86/boot/e820: Fix and clean up e820_type switch() statements
A test-build of e820.o with -Wswitch-enum shows the following warnings:
arch/x86/kernel/e820.c: In function ‘e820_type_to_string’:
arch/x86/kernel/e820.c:965:2: warning: enumeration value ‘E820_TYPE_RESERVED’ not handled in switch [-Wswitch-enum]
switch (entry->type) {
^
arch/x86/kernel/e820.c: In function ‘e820_type_to_iomem_type’:
arch/x86/kernel/e820.c:979:2: warning: enumeration value ‘E820_TYPE_RESERVED’ not handled in switch [-Wswitch-enum]
switch (entry->type) {
^
arch/x86/kernel/e820.c: In function ‘e820_type_to_iores_desc’:
arch/x86/kernel/e820.c:993:2: warning: enumeration value ‘E820_TYPE_RESERVED’ not handled in switch [-Wswitch-enum]
switch (entry->type) {
^
arch/x86/kernel/e820.c: In function ‘do_mark_busy’:
arch/x86/kernel/e820.c:1015:2: warning: enumeration value ‘E820_TYPE_RAM’ not handled in switch [-Wswitch-enum]
switch (type) {
^
Here's the four warnings:
- The one in e820_type_to_string() is a borderline bug, we should differentiate
known-reserved E820 types from unknown types. Fix it by printing a separate
message for unknown E820 types.
- The ones in e820_type_to_iomem_type(), e820_type_to_iores_desc() and
do_mark_busy() are worth documenting, at least to the extent of
enumerating them explicitly.
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Huang, Ying <ying.huang@intel.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Jackson <pj@sgi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/boot/compressed/eboot.c')
0 files changed, 0 insertions, 0 deletions