Skip to content

Commit

Permalink
block: use enum type for blk_mq_alloc_data->rq_flags
Browse files Browse the repository at this point in the history
kernel test robot reports that we now trigger some sparse warnings:

block/blk-mq.h:169:32: sparse: sparse: restricted req_flags_t degrades to integer
block/blk-mq.h:169:32: sparse: sparse: restricted req_flags_t degrades to integer
block/blk-mq.h:169:32: sparse: sparse: restricted req_flags_t degrades to integer

which is due to ->rq_flags being an unsigned int, rather than the
stronger type req_flags_t enum.

Change the type to req_flags_t to silence this warning.

Fixes: 56f8da6 ("block: add rq_flags to struct blk_mq_alloc_data")
Reported-by: kernel test robot <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Nov 10, 2021
1 parent 35e4c6c commit ecaf97f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-mq.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct blk_mq_alloc_data {
blk_mq_req_flags_t flags;
unsigned int shallow_depth;
unsigned int cmd_flags;
unsigned int rq_flags;
req_flags_t rq_flags;

/* allocate multiple requests/tags in one go */
unsigned int nr_tags;
Expand Down

0 comments on commit ecaf97f

Please sign in to comment.