Skip to content

Commit

Permalink
KVM: s390: fix fallthrough annotation
Browse files Browse the repository at this point in the history
A case statement in kvm_s390_shadow_tables uses fallthrough annotations
which are not recognized by gcc because they are hidden within a block.
Move these annotations out of the block to fix (W=1) warnings like below:

arch/s390/kvm/gaccess.c: In function 'kvm_s390_shadow_tables':
arch/s390/kvm/gaccess.c:1029:26: warning: this statement may fall through [-Wimplicit-fallthrough=]
  case ASCE_TYPE_REGION1: {
                          ^

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
  • Loading branch information
Sebastian Ott authored and Christian Borntraeger committed Mar 14, 2018
1 parent a5e0ace commit 4ed8773
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions arch/s390/kvm/gaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,7 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
rc = gmap_shadow_r2t(sg, saddr, rfte.val, *fake);
if (rc)
return rc;
/* fallthrough */
}
} /* fallthrough */
case ASCE_TYPE_REGION2: {
union region2_table_entry rste;

Expand All @@ -1077,8 +1076,7 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
rc = gmap_shadow_r3t(sg, saddr, rste.val, *fake);
if (rc)
return rc;
/* fallthrough */
}
} /* fallthrough */
case ASCE_TYPE_REGION3: {
union region3_table_entry rtte;

Expand Down Expand Up @@ -1113,8 +1111,7 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
rc = gmap_shadow_sgt(sg, saddr, rtte.val, *fake);
if (rc)
return rc;
/* fallthrough */
}
} /* fallthrough */
case ASCE_TYPE_SEGMENT: {
union segment_table_entry ste;

Expand Down

0 comments on commit 4ed8773

Please sign in to comment.