block: Fix the type of 'sts' in bsg_queue_rq()
PATCH 1/1 block: Fix the type of 'sts' in bsg_queue_rq()
This patch fixes the following sparse warnings:
block/bsg-lib.c:269:19: warning: incorrect type in initializer (different base types)block/bsg-lib.c:269:19: expected int stsblock/bsg-lib.c:269:19: got restricted blk_status_t [usertype]block/bsg-lib.c:286:16: warning: incorrect type in return expression (different base types)block/bsg-lib.c:286:16: expected restricted blk_status_tblock/bsg-lib.c:286:16: got int [assigned] sts
--- block/bsg-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/bsg-lib.c +1 -1
@@ -266,7 +266,7 @@ static blk_status_t bsg_queue_rq(struct blk_mq_hw_ctx *hctx,struct request *req = bd->rq;struct bsg_set *bset = container_of(q->tag_set, struct bsg_set, tag_set); -int sts =BLK_STS_IOERR ; +blk_status_t sts =BLK_STS_IOERR ;int ret;blk_mq_start_request (req);
Quoted 8 lines · Bart Van Assche
This patch fixes the following sparse warnings:
block/bsg-lib.c:269:19: warning: incorrect type in initializer (different base types)block/bsg-lib.c:269:19: expected int stsblock/bsg-lib.c:269:19: got restrictedblk_status_t[usertype]block/bsg-lib.c:286:16: warning: incorrect type in return expression (different base types)block/bsg-lib.c:286:16: expected restrictedblk_status_tblock/bsg-lib.c:286:16: got int [assigned] sts
Applied, thanks Bart.
Signature · 1 line
Jens Axboe