From: Vasily Averin <vvs@openvz.org>
To: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Cc: kernel@openvz.org, linux-kernel@vger.kernel.org
Subject: [PATCH] blk-mq: use force attribute for blk_status_t casts
Date: Sat, 14 May 2022 13:03:54 +0300 [thread overview]
Message-ID: <e3251f58-fd47-9b94-387b-ab641a773dd7@openvz.org> (raw)
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@openvz.org>
---
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
next reply other threads:[~2022-05-14 10:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-14 10:03 Vasily Averin [this message]
2022-05-14 21:24 ` [PATCH] blk-mq: use force attribute for blk_status_t casts Jens Axboe
2022-05-16 6:53 ` Christoph Hellwig
2022-05-18 12:45 ` [PATCH v2] blk-mq: fix incorrect " Vasily Averin
2022-05-18 20:35 ` Chaitanya Kulkarni
2022-05-19 7:53 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3251f58-fd47-9b94-387b-ab641a773dd7@openvz.org \
--to=vvs@openvz.org \
--cc=axboe@kernel.dk \
--cc=kernel@openvz.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).