block: Convert to use the preferred fallthrough macro
Subsystems (2)
PATCH 1/1 block: Convert to use the preferred fallthrough macro
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by Hongxiang Lou <[email protected]>
Signed-off-by Miaohe Lin <[email protected]>
--- block/badblocks.c | 2 +- block/bfq-iosched.c | 4 ++-- block/blk-wbt.c | 2 +- block/ioprio.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
block/badblocks.c +1 -1
@@ -525,7 +525,7 @@ ssize_t badblocks_store(struct badblocks *bb, const char *page, size_t len,case 3 :if (newline !='\n' )return -EINVAL ; -/* fall through */ + fallthrough;case 2 :if (length <=0 )return -EINVAL ;
block/bfq-iosched.c +2 -2
@@ -4980,7 +4980,7 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic)pr_err ("bdi %s: bfq: bad prio class %d\n" ,bdi_dev_name (bfqq->bfqd->queue->backing_dev_info), ioprio_class); -/* fall through */ + fallthrough;case IOPRIO_CLASS_NONE :/* * No prio set, inherit CPU scheduling settings.
@@ -5112,7 +5112,7 @@ static struct bfq_queue **bfq_async_queue_prio(struct bfq_data *bfqd,return &bfqg->async_bfqq[0 ][ioprio];case IOPRIO_CLASS_NONE : ioprio =IOPRIO_NORM ; -/* fall through */ + fallthrough;case IOPRIO_CLASS_BE :return &bfqg->async_bfqq[1 ][ioprio];case IOPRIO_CLASS_IDLE :
block/blk-wbt.c +1 -1
@@ -528,7 +528,7 @@ static inline bool wbt_should_throttle(struct rq_wb *rwb, struct bio *bio)if ((bio->bi_opf & (REQ_SYNC |REQ_IDLE )) == (REQ_SYNC |REQ_IDLE ))return false; -/* fallthrough */ + fallthrough;case REQ_OP_DISCARD :return true;default :
block/ioprio.c +1 -1
@@ -71,7 +71,7 @@ int ioprio_check_cap(int ioprio)case IOPRIO_CLASS_RT :if (!capable (CAP_SYS_ADMIN ))return -EPERM ; -/* fall through */ + fallthrough;/* rt has prio field too */ case IOPRIO_CLASS_BE :if (data >=IOPRIO_BE_NR || data <0 )
Signature · 1 line
2.19.1
Quoted 1 line · Miaohe Lin
Convert the uses of fallthrough comments to fallthrough macro.
Applied, thanks.
Signature · 1 line
Jens Axboe