linux-sg2042/arch/s390/mm
Masahiro Yamada bf2f1eeed0 s390: add unreachable() to dump_fault_info() to fix -Wmaybe-uninitialized
When CONFIG_OPTIMIZE_INLINING is enabled for s390, I see this warning:

arch/s390/mm/fault.c:127:15: warning: 'asce' may be used uninitialized in this function [-Wmaybe-uninitialized]
  switch (asce & _ASCE_TYPE_MASK) {
arch/s390/mm/fault.c:177:16: note: 'asce' was declared here
  unsigned long asce;
                ^~~~

If get_fault_type() is not inlined, the compiler cannot deduce that
all the possible paths in the 'switch' statement are covered.

Of course, we could mark get_fault_type() as __always_inline to get
back the original behavior, but I do not think it sensible to force
inlining just for the purpose of suppressing the warning. Since this
is just a matter of warning, I want to keep as much room for compiler
optimization as possible.

I added unreachable() to teach the compiler that the 'default' label
is unreachable.

I got rid of the 'inline' marker. Even without the 'inline' hint,
the compiler inlines functions based on its inlining heuristic.

Fixes: 9012d01166 ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2019-05-28 14:49:21 +02:00
..
Makefile s390/mm: convert to the generic get_user_pages_fast code 2019-04-23 16:30:04 +02:00
cmm.c s390/cmm: avoid add_timer on concurrently used timer 2018-07-16 15:45:41 +02:00
dump_pagetables.c kasan: rename kasan_zero_page to kasan_early_shadow_page 2018-12-28 12:11:43 -08:00
extmem.c s390/extmem: print DCSS range with %px 2019-02-21 15:57:25 +01:00
fault.c s390: add unreachable() to dump_fault_info() to fix -Wmaybe-uninitialized 2019-05-28 14:49:21 +02:00
gmap.c KVM: s390: Features for 4.20 2018-10-04 17:12:45 +02:00
hugetlbpage.c s390/mm: Clear skeys for newly mapped huge guest pmds 2018-07-30 11:20:18 +01:00
init.c mm/memory_hotplug: make __remove_pages() and arch_remove_memory() never fail 2019-05-14 09:47:50 -07:00
kasan_init.c s390/kasan: adapt disabled_wait usage to avoid build error 2019-05-08 15:01:09 +02:00
maccess.c s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
mmap.c s390/mmap: take stack_guard_gap into account for mmap_base 2019-02-07 11:57:01 +01:00
page-states.c s390/mm: fix addressing exception after suspend/resume 2018-08-09 08:05:48 +02:00
pageattr.c s390/mm: Clear huge page storage keys on enable_skey 2018-07-30 11:20:18 +01:00
pgalloc.c s390/tlb: Convert to generic mmu_gather 2019-04-03 10:32:57 +02:00
pgtable.c s390/mm: silence compiler warning when compiling without CONFIG_PGSTE 2019-04-10 17:48:28 +02:00
vmem.c s390/kernel: introduce .dma sections 2019-04-29 10:47:10 +02:00