[PATCH] io_uring: add dummy io_uring_sqe_cmd() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Arnd Bergmann <arnd@xxxxxxxx>

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_free

Add a dummy function like the other interfaces for this configuration.

Fixes: fd9b8547bc5c ("io_uring: Pass whole sqe to commands")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
 include/linux/io_uring.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/io_uring.h b/include/linux/io_uring.h
index 3399d979ee1c..ec1dbd9e2599 100644
--- a/include/linux/io_uring.h
+++ b/include/linux/io_uring.h
@@ -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
-- 
2.39.2




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux