KVM: s390: Use fallthrough;
authorJoe Perches <joe@perches.com>
Wed, 11 Mar 2020 04:51:32 +0000 (21:51 -0700)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 23 Mar 2020 17:30:07 +0000 (18:30 +0100)
Convert the various uses of fallthrough comments to fallthrough;

Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Link: https://lore.kernel.org/r/d63c86429f3e5aa806aa3e185c97d213904924a5.1583896348.git.joe@perches.com
[borntrager@de.ibm.com: Fix link to tool and subject]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/gaccess.c
arch/s390/kvm/interrupt.c
arch/s390/kvm/kvm-s390.c
arch/s390/mm/gmap.c

index 07d30ffcfa4129522ae0592ccd57e5c0e65b97bd..47a67a958107e2e2e6f8e1ea8ad795f1e318ec3b 100644 (file)
@@ -505,7 +505,7 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
                switch (prot) {
                case PROT_TYPE_IEP:
                        tec->b61 = 1;
-                       /* FALL THROUGH */
+                       fallthrough;
                case PROT_TYPE_LA:
                        tec->b56 = 1;
                        break;
@@ -514,12 +514,12 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
                        break;
                case PROT_TYPE_ALC:
                        tec->b60 = 1;
-                       /* FALL THROUGH */
+                       fallthrough;
                case PROT_TYPE_DAT:
                        tec->b61 = 1;
                        break;
                }
-               /* FALL THROUGH */
+               fallthrough;
        case PGM_ASCE_TYPE:
        case PGM_PAGE_TRANSLATION:
        case PGM_REGION_FIRST_TRANS:
@@ -534,7 +534,7 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
                tec->addr = gva >> PAGE_SHIFT;
                tec->fsi = mode == GACC_STORE ? FSI_STORE : FSI_FETCH;
                tec->as = psw_bits(vcpu->arch.sie_block->gpsw).as;
-               /* FALL THROUGH */
+               fallthrough;
        case PGM_ALEN_TRANSLATION:
        case PGM_ALE_SEQUENCE:
        case PGM_ASTE_VALIDITY:
@@ -677,7 +677,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
                        dat_protection |= rfte.p;
                ptr = rfte.rto * PAGE_SIZE + vaddr.rsx * 8;
        }
-               /* fallthrough */
+               fallthrough;
        case ASCE_TYPE_REGION2: {
                union region2_table_entry rste;
 
@@ -695,7 +695,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
                        dat_protection |= rste.p;
                ptr = rste.rto * PAGE_SIZE + vaddr.rtx * 8;
        }
-               /* fallthrough */
+               fallthrough;
        case ASCE_TYPE_REGION3: {
                union region3_table_entry rtte;
 
@@ -723,7 +723,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
                        dat_protection |= rtte.fc0.p;
                ptr = rtte.fc0.sto * PAGE_SIZE + vaddr.sx * 8;
        }
-               /* fallthrough */
+               fallthrough;
        case ASCE_TYPE_SEGMENT: {
                union segment_table_entry ste;
 
@@ -1050,7 +1050,8 @@ shadow_r2t:
                rc = gmap_shadow_r2t(sg, saddr, rfte.val, *fake);
                if (rc)
                        return rc;
-       } /* fallthrough */
+       }
+               fallthrough;
        case ASCE_TYPE_REGION2: {
                union region2_table_entry rste;
 
@@ -1076,7 +1077,8 @@ shadow_r3t:
                rc = gmap_shadow_r3t(sg, saddr, rste.val, *fake);
                if (rc)
                        return rc;
-       } /* fallthrough */
+       }
+               fallthrough;
        case ASCE_TYPE_REGION3: {
                union region3_table_entry rtte;
 
@@ -1111,7 +1113,8 @@ shadow_sgt:
                rc = gmap_shadow_sgt(sg, saddr, rtte.val, *fake);
                if (rc)
                        return rc;
-       } /* fallthrough */
+       }
+               fallthrough;
        case ASCE_TYPE_SEGMENT: {
                union segment_table_entry ste;
 
index 028167d6eacdd53fddfc7ada3952a90f3884deed..8191106bf7b92dcf99caec72516b18b8c9212691 100644 (file)
@@ -886,7 +886,7 @@ static int __must_check __deliver_prog(struct kvm_vcpu *vcpu)
        case PGM_PRIMARY_AUTHORITY:
        case PGM_SECONDARY_AUTHORITY:
                nullifying = true;
-               /* fall through */
+               fallthrough;
        case PGM_SPACE_SWITCH:
                rc = put_guest_lc(vcpu, pgm_info.trans_exc_code,
                                  (u64 *)__LC_TRANS_EXC_CODE);
index 6b1842a9feedd782025d9e7d760d7eeaf8c60672..d590f32f13d34bebc276f141a2d8f8dc1975280b 100644 (file)
@@ -3752,7 +3752,7 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
                rc = kvm_s390_pv_set_cpu_state(vcpu, PV_CPU_STATE_OPR_LOAD);
                break;
        case KVM_MP_STATE_CHECK_STOP:
-               /* fall through - CHECK_STOP and LOAD are not supported yet */
+               fallthrough;    /* CHECK_STOP and LOAD are not supported yet */
        default:
                rc = -ENXIO;
        }
@@ -4985,7 +4985,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
                                        old->npages * PAGE_SIZE);
                if (rc)
                        break;
-               /* FALLTHROUGH */
+               fallthrough;
        case KVM_MR_CREATE:
                rc = gmap_map_segment(kvm->arch.gmap, mem->userspace_addr,
                                      mem->guest_phys_addr, mem->memory_size);
index 27926a06df32a3930b6e73519dab682b5be07b17..03c899849c38cf797d41a2aed73d1dc67bc3d3c8 100644 (file)
@@ -804,7 +804,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
                if (*table & _REGION_ENTRY_INVALID)
                        return NULL;
                table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
-               /* Fallthrough */
+               fallthrough;
        case _ASCE_TYPE_REGION2:
                table += (gaddr & _REGION2_INDEX) >> _REGION2_SHIFT;
                if (level == 3)
@@ -812,7 +812,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
                if (*table & _REGION_ENTRY_INVALID)
                        return NULL;
                table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
-               /* Fallthrough */
+               fallthrough;
        case _ASCE_TYPE_REGION3:
                table += (gaddr & _REGION3_INDEX) >> _REGION3_SHIFT;
                if (level == 2)
@@ -820,7 +820,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
                if (*table & _REGION_ENTRY_INVALID)
                        return NULL;
                table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
-               /* Fallthrough */
+               fallthrough;
        case _ASCE_TYPE_SEGMENT:
                table += (gaddr & _SEGMENT_INDEX) >> _SEGMENT_SHIFT;
                if (level == 1)