Change the type of the alloc_flags parameter of the block_rq_tag_wait tracepoint from unsigned int to blk_mq_req_flags_t. blk_mq_get_tag() passes data->flags, which has the __bitwise type blk_mq_req_flags_t, as the alloc_flags argument, and TP_fast_assign masks alloc_flags with BLK_MQ_REQ_RESERVED, which also has type blk_mq_req_flags_t. Declaring alloc_flags as unsigned int causes sparse type-mismatch warnings at the call site and in the bitwise AND expression. This fixes the following sparse warnings: ./include/trace/events/block.h:244:1: warning: restricted blk_mq_req_flags_t degrades to integer block/blk-mq-tag.c:195:45: warning: incorrect type in argument 4 (different base types) block/blk-mq-tag.c:195:45: expected unsigned int alloc_flags block/blk-mq-tag.c:195:45: got restricted blk_mq_req_flags_t [usertype] flags Signed-off-by: Bart Van Assche --- include/trace/events/block.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 9c97a16850b9..32563fac73c0 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h @@ -244,7 +244,7 @@ DECLARE_EVENT_CLASS(block_rq, TRACE_EVENT(block_rq_tag_wait, TP_PROTO(struct request_queue *q, struct blk_mq_hw_ctx *hctx, - bool is_sched_tag, unsigned int alloc_flags), + bool is_sched_tag, blk_mq_req_flags_t alloc_flags), TP_ARGS(q, hctx, is_sched_tag, alloc_flags),