io_uring/uring_cmd: specify io_uring_cmd_import_fixed() pointer type

io_uring_cmd_import_fixed() takes a struct io_uring_cmd *, but the type
of the ioucmd parameter is void *. Make the pointer type explicit so the
compiler can type check it.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250228221514.604350-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
pull/1188/head
Caleb Sander Mateos 2025-02-28 15:15:13 -07:00 committed by Jens Axboe
parent 2fced37638
commit 0c542a69cb
2 changed files with 8 additions and 5 deletions

View File

@ -40,7 +40,8 @@ static inline void io_uring_cmd_private_sz_check(size_t cmd_sz)
#if defined(CONFIG_IO_URING) #if defined(CONFIG_IO_URING)
int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw, int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw,
struct iov_iter *iter, void *ioucmd, struct iov_iter *iter,
struct io_uring_cmd *ioucmd,
unsigned int issue_flags); unsigned int issue_flags);
/* /*
@ -68,9 +69,10 @@ void io_uring_cmd_mark_cancelable(struct io_uring_cmd *cmd,
void io_uring_cmd_issue_blocking(struct io_uring_cmd *ioucmd); void io_uring_cmd_issue_blocking(struct io_uring_cmd *ioucmd);
#else #else
static inline int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw, static inline int
struct iov_iter *iter, void *ioucmd, io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw,
unsigned int issue_flags) struct iov_iter *iter, struct io_uring_cmd *ioucmd,
unsigned int issue_flags)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }

View File

@ -245,7 +245,8 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
} }
int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw, int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw,
struct iov_iter *iter, void *ioucmd, struct iov_iter *iter,
struct io_uring_cmd *ioucmd,
unsigned int issue_flags) unsigned int issue_flags)
{ {
struct io_kiocb *req = cmd_to_io_kiocb(ioucmd); struct io_kiocb *req = cmd_to_io_kiocb(ioucmd);