io_uring: add dummy io_uring_sqe_cmd() helper
PATCH 1/1 io_uring: add dummy io_uring_sqe_cmd() helper
From: Arnd Bergmann <[email protected]>
When CONFIG_IO_URING is disabled, the NVMe host support fails to build:
drivers/nvme/host/ioctl.c: In function 'nvme_uring_cmd_io':drivers/nvme/host/ioctl.c:555:44: error: implicit declaration of function 'io_uring_sqe_cmd'; did you mean 'io_uring_free'? [-Werror=implicit-function-declaration]
555 | const struct nvme_uring_cmd *cmd = io_uring_sqe_cmd(ioucmd->sqe);
| ^~~~~~~~~~~~~~~~
| io_uring_freeAdd a dummy function like the other interfaces for this configuration.
--- include/linux/io_uring.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/io_uring.h +4 -0
@@ -102,6 +102,10 @@ static inline const char *io_uring_get_opcode(u8 opcode) {return "" ; } +static inline const void *io_uring_sqe_cmd (const struct io_uring_sqe *sqe) +{ +return NULL ; +}#endif #endif
Signature · 1 line
2.39.2
Quoted 1 line · Arnd Bergmann
Add a dummy function like the other interfaces for this configuration.
Why do we need a separate dummy? The structure is unconditionally defined, so we can just unconditionally define the helper.
Jens Axboe
maintainerQuoted 5 lines · Christoph Hellwig
Quoted 1 line · Arnd Bergmann
Add a dummy function like the other interfaces for this configuration.
Why do we need a separate dummy? The structure is unconditionally defined, so we can just unconditionally define the helper.
Yeah, no reason for a special one. I'll send one out.
Signature · 1 line
Jens Axboe