dm raid: fix fall-through warning in rs_check_takeover() for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 20 Apr 2021 22:09:02 +0000 (18:09 -0400)
committerMike Snitzer <snitzer@redhat.com>
Tue, 20 Apr 2021 22:10:04 +0000 (18:10 -0400)
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a break statement instead of letting the code 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: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c

index cab12b2..59d2150 100644 (file)
@@ -1853,6 +1853,7 @@ static int rs_check_takeover(struct raid_set *rs)
                    ((mddev->layout == ALGORITHM_PARITY_N && mddev->new_layout == ALGORITHM_PARITY_N) ||
                     __within_range(mddev->new_layout, ALGORITHM_LEFT_ASYMMETRIC, ALGORITHM_RIGHT_SYMMETRIC)))
                        return 0;
+               break;
 
        default:
                break;