* [PATCH] io_uring: fix casts to io_req_flags_t
@ 2024-09-22 10:41 Min-Hua Chen
2024-09-24 11:35 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Min-Hua Chen @ 2024-09-22 10:41 UTC (permalink / raw)
To: Jens Axboe, Pavel Begunkov; +Cc: Min-Hua Chen, io-uring, linux-kernel
Apply __force cast to restricted io_req_flags_t type to fix
the following sparse warning:
io_uring/io_uring.c:2026:23: sparse: warning: cast to restricted io_req_flags_t
No functional changes intended.
Signed-off-by: Min-Hua Chen <[email protected]>
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index f3570e81ecb4..de79fa259d56 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2023,7 +2023,7 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req,
req->opcode = opcode = READ_ONCE(sqe->opcode);
/* same numerical values with corresponding REQ_F_*, safe to copy */
sqe_flags = READ_ONCE(sqe->flags);
- req->flags = (io_req_flags_t) sqe_flags;
+ req->flags = (__force io_req_flags_t) sqe_flags;
req->cqe.user_data = READ_ONCE(sqe->user_data);
req->file = NULL;
req->rsrc_node = NULL;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] io_uring: fix casts to io_req_flags_t
2024-09-22 10:41 [PATCH] io_uring: fix casts to io_req_flags_t Min-Hua Chen
@ 2024-09-24 11:35 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2024-09-24 11:35 UTC (permalink / raw)
To: Pavel Begunkov, Min-Hua Chen; +Cc: io-uring, linux-kernel
On Sun, 22 Sep 2024 18:41:29 +0800, Min-Hua Chen wrote:
> Apply __force cast to restricted io_req_flags_t type to fix
> the following sparse warning:
>
> io_uring/io_uring.c:2026:23: sparse: warning: cast to restricted io_req_flags_t
>
> No functional changes intended.
>
> [...]
Applied, thanks!
[1/1] io_uring: fix casts to io_req_flags_t
commit: 5dc4669c80354d3d7fdf87ac853bd1246928f2b7
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-24 11:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-22 10:41 [PATCH] io_uring: fix casts to io_req_flags_t Min-Hua Chen
2024-09-24 11:35 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox