Commit b3cefd6
KVM: s390: Pass initialized arg even if unused
This silences smatch warnings reported by kbuild bot:
arch/s390/kvm/gaccess.c:859 guest_range_to_gpas() error: uninitialized symbol 'prot'.
arch/s390/kvm/gaccess.c:1064 access_guest_with_key() error: uninitialized symbol 'prot'.
This is because it cannot tell that the value is not used in this case.
The trans_exc* only examine prot if code is PGM_PROTECTION.
Pass a dummy value for other codes.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Link: https://lore.kernel.org/r/20220825192540.1560559-1-scgl@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>1 parent e8c924a commit b3cefd6
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
| 493 | + | |
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
| |||
504 | 506 | | |
505 | 507 | | |
506 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
507 | 513 | | |
508 | 514 | | |
509 | 515 | | |
| |||
968 | 974 | | |
969 | 975 | | |
970 | 976 | | |
971 | | - | |
| 977 | + | |
972 | 978 | | |
| 979 | + | |
| 980 | + | |
973 | 981 | | |
974 | 982 | | |
975 | 983 | | |
| |||
1112 | 1120 | | |
1113 | 1121 | | |
1114 | 1122 | | |
1115 | | - | |
1116 | | - | |
1117 | 1123 | | |
1118 | 1124 | | |
1119 | 1125 | | |
| |||
1123 | 1129 | | |
1124 | 1130 | | |
1125 | 1131 | | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1126 | 1136 | | |
1127 | 1137 | | |
1128 | 1138 | | |
| |||
0 commit comments