Skip to content

Commit f3ca738

Browse files
committed
block: use proper return value from bio_failfast()
kernel test robot complains about a type mismatch: block/blk-merge.c:984:42: sparse: expected restricted blk_opf_t const [usertype] ff block/blk-merge.c:984:42: sparse: got unsigned int block/blk-merge.c:1010:42: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted blk_opf_t const [usertype] ff @@ got unsigned int @@ block/blk-merge.c:1010:42: sparse: expected restricted blk_opf_t const [usertype] ff block/blk-merge.c:1010:42: sparse: got unsigned int because bio_failfast() is return an unsigned int rather than the appropriate blk_opt_f type. Fix it up. Fixes: 3ce6a11 ("block: sync mixed merged request's failfast with 1st bio's") Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Jens Axboe <[email protected]>
1 parent b6a4bdc commit f3ca738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-merge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ void blk_rq_set_mixed_merge(struct request *rq)
757757
rq->rq_flags |= RQF_MIXED_MERGE;
758758
}
759759

760-
static inline unsigned int bio_failfast(const struct bio *bio)
760+
static inline blk_opf_t bio_failfast(const struct bio *bio)
761761
{
762762
if (bio->bi_opf & REQ_RAHEAD)
763763
return REQ_FAILFAST_MASK;

0 commit comments

Comments
 (0)