Fixes sparse warnings: block/blk-mq.c:1163:36: sparse: warning: cast from restricted blk_status_t block/blk-mq.c:1251:17: sparse: warning: cast to restricted blk_status_t Signed-off-by: Vasily Averin <vvs@xxxxxxxxxx> --- block/blk-mq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 84d749511f55..1b887f2d4a19 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1160,7 +1160,7 @@ static void blk_end_sync_rq(struct request *rq, blk_status_t error) { struct completion *waiting = rq->end_io_data; - rq->end_io_data = (void *)(uintptr_t)error; + rq->end_io_data = (void *)(__force uintptr_t)error; /* * complete last, if this is a stack request the process (and thus @@ -1248,7 +1248,7 @@ blk_status_t blk_execute_rq(struct request *rq, bool at_head) else wait_for_completion_io(&wait); - return (blk_status_t)(uintptr_t)rq->end_io_data; + return (__force blk_status_t)(uintptr_t)rq->end_io_data; } EXPORT_SYMBOL(blk_execute_rq); -- 2.31.1