afs: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple fallthrough pseudo-keywords in places where the code is intended to fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeffrey Altman <jaltman@auristor.com> cc: linux-afs@lists.infradead.org cc: linux-hardening@vger.kernel.org Link: https://lore.kernel.org/r/51150b54e0b0431a2c401cd54f2c4e7f50e94601.1605896059.git.gustavoars@kernel.org/ # v1 Link: https://lore.kernel.org/r/20210420211615.GA51432@embeddedor/ # v2 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
a050a6d2b7
commit
b2db6c35ba
@ -322,6 +322,8 @@ static int afs_deliver_cb_callback(struct afs_call *call)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
call->unmarshall++;
|
call->unmarshall++;
|
||||||
|
fallthrough;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -418,6 +420,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
|
|||||||
r->node[loop] = ntohl(b[loop + 5]);
|
r->node[loop] = ntohl(b[loop + 5]);
|
||||||
|
|
||||||
call->unmarshall++;
|
call->unmarshall++;
|
||||||
|
fallthrough;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
break;
|
break;
|
||||||
@ -530,6 +533,7 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call)
|
|||||||
r->node[loop] = ntohl(b[loop + 5]);
|
r->node[loop] = ntohl(b[loop + 5]);
|
||||||
|
|
||||||
call->unmarshall++;
|
call->unmarshall++;
|
||||||
|
fallthrough;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
break;
|
break;
|
||||||
@ -663,6 +667,7 @@ static int afs_deliver_yfs_cb_callback(struct afs_call *call)
|
|||||||
|
|
||||||
afs_extract_to_tmp(call);
|
afs_extract_to_tmp(call);
|
||||||
call->unmarshall++;
|
call->unmarshall++;
|
||||||
|
fallthrough;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
break;
|
break;
|
||||||
|
@ -388,6 +388,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
|
|||||||
req->file_size = vp->scb.status.size;
|
req->file_size = vp->scb.status.size;
|
||||||
|
|
||||||
call->unmarshall++;
|
call->unmarshall++;
|
||||||
|
fallthrough;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
break;
|
break;
|
||||||
@ -1408,6 +1409,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call)
|
|||||||
_debug("motd '%s'", p);
|
_debug("motd '%s'", p);
|
||||||
|
|
||||||
call->unmarshall++;
|
call->unmarshall++;
|
||||||
|
fallthrough;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
break;
|
break;
|
||||||
@ -1845,6 +1847,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call)
|
|||||||
xdr_decode_AFSVolSync(&bp, &op->volsync);
|
xdr_decode_AFSVolSync(&bp, &op->volsync);
|
||||||
|
|
||||||
call->unmarshall++;
|
call->unmarshall++;
|
||||||
|
fallthrough;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
break;
|
break;
|
||||||
@ -1979,6 +1982,7 @@ static int afs_deliver_fs_fetch_acl(struct afs_call *call)
|
|||||||
xdr_decode_AFSVolSync(&bp, &op->volsync);
|
xdr_decode_AFSVolSync(&bp, &op->volsync);
|
||||||
|
|
||||||
call->unmarshall++;
|
call->unmarshall++;
|
||||||
|
fallthrough;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
break;
|
break;
|
||||||
|
@ -593,6 +593,7 @@ static int afs_deliver_yfsvl_get_endpoints(struct afs_call *call)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
call->unmarshall = 6;
|
call->unmarshall = 6;
|
||||||
|
fallthrough;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user