forked from luck/tmp_suning_uos_patched
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 <bart.vanassche@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
0e9350de2e
commit
e29387ebd8
|
@ -533,6 +533,7 @@ ssize_t badblocks_store(struct badblocks *bb, const char *page, size_t len,
|
||||||
case 3:
|
case 3:
|
||||||
if (newline != '\n')
|
if (newline != '\n')
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
/* fall through */
|
||||||
case 2:
|
case 2:
|
||||||
if (length <= 0)
|
if (length <= 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -681,6 +681,7 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where)
|
||||||
*/
|
*/
|
||||||
if (elv_attempt_insert_merge(q, rq))
|
if (elv_attempt_insert_merge(q, rq))
|
||||||
break;
|
break;
|
||||||
|
/* fall through */
|
||||||
case ELEVATOR_INSERT_SORT:
|
case ELEVATOR_INSERT_SORT:
|
||||||
BUG_ON(blk_rq_is_passthrough(rq));
|
BUG_ON(blk_rq_is_passthrough(rq));
|
||||||
rq->rq_flags |= RQF_SORTED;
|
rq->rq_flags |= RQF_SORTED;
|
||||||
|
|
|
@ -75,7 +75,8 @@ SYSCALL_DEFINE3(ioprio_set, int, which, int, who, int, ioprio)
|
||||||
case IOPRIO_CLASS_RT:
|
case IOPRIO_CLASS_RT:
|
||||||
if (!capable(CAP_SYS_ADMIN))
|
if (!capable(CAP_SYS_ADMIN))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
/* fall through, rt has prio field too */
|
/* fall through */
|
||||||
|
/* rt has prio field too */
|
||||||
case IOPRIO_CLASS_BE:
|
case IOPRIO_CLASS_BE:
|
||||||
if (data >= IOPRIO_BE_NR || data < 0)
|
if (data >= IOPRIO_BE_NR || data < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user