Skip to content

Commit 17ea56b

Browse files
Min-Huaaxboe
authored andcommitted
io_uring: fix casts to io_req_flags_t
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]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 3a87e26 commit 17ea56b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_uring/io_uring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2041,7 +2041,7 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req,
20412041
req->opcode = opcode = READ_ONCE(sqe->opcode);
20422042
/* same numerical values with corresponding REQ_F_*, safe to copy */
20432043
sqe_flags = READ_ONCE(sqe->flags);
2044-
req->flags = (io_req_flags_t) sqe_flags;
2044+
req->flags = (__force io_req_flags_t) sqe_flags;
20452045
req->cqe.user_data = READ_ONCE(sqe->user_data);
20462046
req->file = NULL;
20472047
req->rsrc_node = NULL;

0 commit comments

Comments
 (0)