Skip to content

Commit d769a99

Browse files
GustavoARSilvaaxboe
authored andcommitted
drbd: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used in this case: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent b04f50a commit d769a99

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/block/drbd/drbd_receiver.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2790,6 +2790,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
27902790
then we would do something smarter here than reading
27912791
the block... */
27922792
peer_req->flags |= EE_RS_THIN_REQ;
2793+
/* fall through */
27932794
case P_RS_DATA_REQUEST:
27942795
peer_req->w.cb = w_e_end_rsdata_req;
27952796
fault_type = DRBD_FAULT_RS_RD;
@@ -2968,6 +2969,7 @@ static int drbd_asb_recover_0p(struct drbd_peer_device *peer_device) __must_hold
29682969
/* Else fall through to one of the other strategies... */
29692970
drbd_warn(device, "Discard younger/older primary did not find a decision\n"
29702971
"Using discard-least-changes instead\n");
2972+
/* fall through */
29712973
case ASB_DISCARD_ZERO_CHG:
29722974
if (ch_peer == 0 && ch_self == 0) {
29732975
rv = test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags)
@@ -2979,6 +2981,7 @@ static int drbd_asb_recover_0p(struct drbd_peer_device *peer_device) __must_hold
29792981
}
29802982
if (after_sb_0p == ASB_DISCARD_ZERO_CHG)
29812983
break;
2984+
/* else: fall through */
29822985
case ASB_DISCARD_LEAST_CHG:
29832986
if (ch_self < ch_peer)
29842987
rv = -1;

0 commit comments

Comments
 (0)