]> git.baikalelectronics.ru Git - kernel.git/commit
block: Change the type of req_op() and bio_op() into enum req_op
authorBart Van Assche <bvanassche@acm.org>
Thu, 14 Jul 2022 18:06:30 +0000 (11:06 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 14 Jul 2022 18:14:30 +0000 (12:14 -0600)
commitbd1865096a07c7861f3098f4e3fda5bc73a50599
tree7ef978491e21df66fe4a573615917261532629a1
parenta01fdd304c1a9343d219d5f2457bd1073234731b
block: Change the type of req_op() and bio_op() into enum req_op

Improve static type checking by changing the type of the value returned by
req_op() and bio_op() from unsigned int into enum req_op. Insert
'default: break;' in switch statements on the enum req_op type to prevent
that the compiler warns about these switch statements.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Tim Waugh <tim@cyberelk.net>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Mike Snitzer <snitzer@kernel.org>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20220714180729.1065367-5-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-merge.c
drivers/block/paride/pd.c
drivers/md/dm.c
include/linux/blk-mq.h
include/linux/blk_types.h