mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
block: Use enum req_op where appropriate
Change the type of the arguments that are used to pass a REQ_OP_* value from int or unsigned int into enum req_op to improve static type checking. 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> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20220714180729.1065367-3-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
ff07a02e9e
commit
77e7ffd7ad
@@ -136,7 +136,7 @@ static const char *const blk_op_name[] = {
|
||||
* string format. Useful in the debugging and tracing bio or request. For
|
||||
* invalid REQ_OP_XXX it returns string "UNKNOWN".
|
||||
*/
|
||||
inline const char *blk_op_str(unsigned int op)
|
||||
inline const char *blk_op_str(enum req_op op)
|
||||
{
|
||||
const char *op_str = "UNKNOWN";
|
||||
|
||||
@@ -953,7 +953,7 @@ again:
|
||||
}
|
||||
|
||||
unsigned long bdev_start_io_acct(struct block_device *bdev,
|
||||
unsigned int sectors, unsigned int op,
|
||||
unsigned int sectors, enum req_op op,
|
||||
unsigned long start_time)
|
||||
{
|
||||
const int sgrp = op_stat_group(op);
|
||||
@@ -994,7 +994,7 @@ unsigned long bio_start_io_acct(struct bio *bio)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bio_start_io_acct);
|
||||
|
||||
void bdev_end_io_acct(struct block_device *bdev, unsigned int op,
|
||||
void bdev_end_io_acct(struct block_device *bdev, enum req_op op,
|
||||
unsigned long start_time)
|
||||
{
|
||||
const int sgrp = op_stat_group(op);
|
||||
|
||||
Reference in New Issue
Block a user