linux/drivers/block/null_blk
Jens Axboe c5eafd790e null_blk: cast command status to integer
kernel test robot reports that sparse now triggers a warning on null_blk:

>> drivers/block/null_blk/main.c:1577:55: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected int ioerror @@     got restricted blk_status_t [usertype] error @@
   drivers/block/null_blk/main.c:1577:55: sparse:     expected int ioerror
   drivers/block/null_blk/main.c:1577:55: sparse:     got restricted blk_status_t [usertype] error

because blk_mq_add_to_batch() takes an integer instead of a blk_status_t.
Just cast this to an integer to silence it, null_blk is the odd one out
here since the command status is the "right" type. If we change the
function type, then we'll have do that for other callers too (existing and
future ones).

Fixes: 2385ebf38f ("block: null_blk: batched complete poll requests")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-12-10 16:32:44 -07:00
..
Kconfig
main.c null_blk: cast command status to integer 2021-12-10 16:32:44 -07:00
Makefile
null_blk.h null_blk: Fix handling of submit_queues and poll_queues attributes 2021-10-29 06:55:39 -06:00
trace.c
trace.h block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
zoned.c drivers/block/null_blk/main: Fix a double free in null_init. 2021-04-26 09:04:40 -06:00