diff options
author | Caleb Sander Mateos <csander@purestorage.com> | 2025-09-02 04:26:07 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-09-04 02:34:36 +0300 |
commit | dd386b0d5e61556927189cd7b59a628d22cb6851 (patch) | |
tree | 0d2241f6c518a558427cf1f5b43bafcbe4723922 /include/linux/io_uring/cmd.h | |
parent | df3a7762ee24ba6a33d4215244e329ca300f4819 (diff) | |
download | linux-dd386b0d5e61556927189cd7b59a628d22cb6851.tar.xz |
io_uring/uring_cmd: correct io_uring_cmd_done() ret type
io_uring_cmd_done() takes the result code for the CQE as a ssize_t ret
argument. However, the CQE res field is a s32 value, as is the argument
to io_req_set_res(). To clarify that only s32 values can be faithfully
represented without truncation, change io_uring_cmd_done()'s ret
argument type to s32.
Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250902012609.1513123-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/io_uring/cmd.h')
-rw-r--r-- | include/linux/io_uring/cmd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/io_uring/cmd.h b/include/linux/io_uring/cmd.h index 7211157edfe9..c4d7874016bb 100644 --- a/include/linux/io_uring/cmd.h +++ b/include/linux/io_uring/cmd.h @@ -56,7 +56,7 @@ int io_uring_cmd_import_fixed_vec(struct io_uring_cmd *ioucmd, * Note: the caller should never hard code @issue_flags and is only allowed * to pass the mask provided by the core io_uring code. */ -void io_uring_cmd_done(struct io_uring_cmd *cmd, ssize_t ret, u64 res2, +void io_uring_cmd_done(struct io_uring_cmd *cmd, s32 ret, u64 res2, unsigned issue_flags); void __io_uring_cmd_do_in_task(struct io_uring_cmd *ioucmd, @@ -104,7 +104,7 @@ static inline int io_uring_cmd_import_fixed_vec(struct io_uring_cmd *ioucmd, { return -EOPNOTSUPP; } -static inline void io_uring_cmd_done(struct io_uring_cmd *cmd, ssize_t ret, +static inline void io_uring_cmd_done(struct io_uring_cmd *cmd, s32 ret, u64 ret2, unsigned issue_flags) { } |