mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 23:13:00 +00:00
null_blk: Fix two sparse warnings
Fix the following sparse warnings: drivers/block/null_blk/main.c:1243:35: warning: incorrect type in return expression (different base types) drivers/block/null_blk/main.c:1243:35: expected int drivers/block/null_blk/main.c:1243:35: got restricted blk_status_t drivers/block/null_blk/main.c:1291:30: warning: incorrect type in return expression (different base types) drivers/block/null_blk/main.c:1291:30: expected restricted blk_status_t drivers/block/null_blk/main.c:1291:30: got int Cc: Christoph Hellwig <hch@lst.de> Cc: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20240510201816.24921-1-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
928b607d1a
commit
25260555b1
|
@ -1218,7 +1218,7 @@ static int null_transfer(struct nullb *nullb, struct page *page,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int null_handle_rq(struct nullb_cmd *cmd)
|
||||
static blk_status_t null_handle_rq(struct nullb_cmd *cmd)
|
||||
{
|
||||
struct request *rq = blk_mq_rq_from_pdu(cmd);
|
||||
struct nullb *nullb = cmd->nq->dev->nullb;
|
||||
|
|
|
@ -36,7 +36,12 @@ TRACE_EVENT(nullb_zone_op,
|
|||
TP_ARGS(cmd, zone_no, zone_cond),
|
||||
TP_STRUCT__entry(
|
||||
__array(char, disk, DISK_NAME_LEN)
|
||||
__field(enum req_op, op)
|
||||
/*
|
||||
* __field() uses is_signed_type(). is_signed_type() does not
|
||||
* support bitwise types. Use __field_struct() instead because
|
||||
* it does not use is_signed_type().
|
||||
*/
|
||||
__field_struct(enum req_op, op)
|
||||
__field(unsigned int, zone_no)
|
||||
__field(unsigned int, zone_cond)
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue
Block a user