bf2f1eeed0
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:
|
||
---|---|---|
.. | ||
Makefile | ||
cmm.c | ||
dump_pagetables.c | ||
extmem.c | ||
fault.c | ||
gmap.c | ||
hugetlbpage.c | ||
init.c | ||
kasan_init.c | ||
maccess.c | ||
mmap.c | ||
page-states.c | ||
pageattr.c | ||
pgalloc.c | ||
pgtable.c | ||
vmem.c |