* [PATCH] block: Fix the type of 'sts' in bsg_queue_rq()
@ 2019-12-18 0:23 Bart Van Assche
2019-12-18 1:10 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Bart Van Assche @ 2019-12-18 0:23 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, Bart Van Assche, Martin Wilck
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 sts
block/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_t
block/bsg-lib.c:286:16: got int [assigned] sts
Cc: Martin Wilck <mwilck@suse.com>
Fixes: d46fe2cb2dce ("block: drop device references in bsg_queue_rq()")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/bsg-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index 347dda16c2f4..6cbb7926534c 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] block: Fix the type of 'sts' in bsg_queue_rq()
2019-12-18 0:23 [PATCH] block: Fix the type of 'sts' in bsg_queue_rq() Bart Van Assche
@ 2019-12-18 1:10 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-12-18 1:10 UTC (permalink / raw)
To: Bart Van Assche; +Cc: linux-block, Christoph Hellwig, Martin Wilck
On 12/17/19 5:23 PM, Bart Van Assche wrote:
> 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 sts
> block/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_t
> block/bsg-lib.c:286:16: got int [assigned] sts
Applied, thanks Bart.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-18 1:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-18 0:23 [PATCH] block: Fix the type of 'sts' in bsg_queue_rq() Bart Van Assche
2019-12-18 1:10 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox