Skip to content

Commit ecaf97f

Browse files
committed
block: use enum type for blk_mq_alloc_data->rq_flags
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 <lkp@intel.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 35e4c6c commit ecaf97f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

block/blk-mq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ struct blk_mq_alloc_data {
149149
blk_mq_req_flags_t flags;
150150
unsigned int shallow_depth;
151151
unsigned int cmd_flags;
152-
unsigned int rq_flags;
152+
req_flags_t rq_flags;
153153

154154
/* allocate multiple requests/tags in one go */
155155
unsigned int nr_tags;

0 commit comments

Comments
 (0)