public inbox for [email protected]
 help / color / mirror / Atom feed
From: Arnd Bergmann <[email protected]>
To: Jens Axboe <[email protected]>, Keith Busch <[email protected]>,
	Breno Leitao <[email protected]>,
	Pavel Begunkov <[email protected]>
Cc: Arnd Bergmann <[email protected]>,
	Kanchan Joshi <[email protected]>,
	Anuj Gupta <[email protected]>,
	Geert Uytterhoeven <[email protected]>,
	[email protected], [email protected]
Subject: [PATCH] io_uring: add dummy io_uring_sqe_cmd() helper
Date: Mon,  8 May 2023 09:08:18 +0200	[thread overview]
Message-ID: <[email protected]> (raw)

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_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 <[email protected]>
---
 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


             reply	other threads:[~2023-05-08  7:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08  7:08 Arnd Bergmann [this message]
2023-05-08 14:40 ` [PATCH] io_uring: add dummy io_uring_sqe_cmd() helper Christoph Hellwig
2023-05-08 18:10   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox