From e29387ebd86e903702422a8361fd3e03aca25573 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 21 Jun 2017 09:40:11 -0700 Subject: block: Add fallthrough markers to switch statements This patch suppresses gcc 7 warnings about falling through in switch statements when building with W=1. From the gcc documentation: The -Wimplicit-fallthrough=3 warning is enabled by -Wextra. See also https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Warning-Options.html. Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe --- block/elevator.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block/elevator.c') diff --git a/block/elevator.c b/block/elevator.c index dac99fbfc273f..4bb2f0c93fa6c 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -681,6 +681,7 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where) */ if (elv_attempt_insert_merge(q, rq)) break; + /* fall through */ case ELEVATOR_INSERT_SORT: BUG_ON(blk_rq_is_passthrough(rq)); rq->rq_flags |= RQF_SORTED; -- cgit v1.2.3