Commit 41459d36cf0d57813017dae6080a879cc038e5fe
Committed by
Martin Schwidefsky
1 parent
6b563d8c26
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
s390: add uninitialized_var() to suppress false positive compiler warnings
Get rid of these: arch/s390/kernel/smp.c:134:19: warning: ‘status’ may be used uninitialized in this function [-Wuninitialized] arch/s390/mm/pgtable.c:641:10: warning: ‘table’ may be used uninitialized in this function [-Wuninitialized] arch/s390/mm/pgtable.c:644:12: warning: ‘page’ may be used uninitialized in this function [-Wuninitialized] drivers/s390/cio/cio.c:1037:14: warning: ‘schid’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Showing 3 changed files with 4 additions and 4 deletions Side-by-side Diff
arch/s390/kernel/smp.c
arch/s390/mm/pgtable.c
... | ... | @@ -609,8 +609,8 @@ |
609 | 609 | */ |
610 | 610 | unsigned long *page_table_alloc(struct mm_struct *mm, unsigned long vmaddr) |
611 | 611 | { |
612 | - struct page *page; | |
613 | - unsigned long *table; | |
612 | + unsigned long *uninitialized_var(table); | |
613 | + struct page *uninitialized_var(page); | |
614 | 614 | unsigned int mask, bit; |
615 | 615 | |
616 | 616 | if (mm_has_pgste(mm)) |
drivers/s390/cio/cio.c
... | ... | @@ -1029,7 +1029,7 @@ |
1029 | 1029 | /* Make sure all subchannels are quiet before we re-ipl an lpar. */ |
1030 | 1030 | void reipl_ccw_dev(struct ccw_dev_id *devid) |
1031 | 1031 | { |
1032 | - struct subchannel_id schid; | |
1032 | + struct subchannel_id uninitialized_var(schid); | |
1033 | 1033 | |
1034 | 1034 | s390_reset_system(NULL, NULL); |
1035 | 1035 | if (reipl_find_schid(devid, &schid) != 0) |