* [PATCH] io_uring: add dummy io_uring_sqe_cmd() helper
@ 2023-05-08 7:08 Arnd Bergmann
2023-05-08 14:40 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2023-05-08 7:08 UTC (permalink / raw)
To: Jens Axboe, Keith Busch, Breno Leitao, Pavel Begunkov
Cc: Arnd Bergmann, Kanchan Joshi, Anuj Gupta, Geert Uytterhoeven,
io-uring, linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] io_uring: add dummy io_uring_sqe_cmd() helper
2023-05-08 7:08 [PATCH] io_uring: add dummy io_uring_sqe_cmd() helper Arnd Bergmann
@ 2023-05-08 14:40 ` Christoph Hellwig
2023-05-08 18:10 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2023-05-08 14:40 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jens Axboe, Keith Busch, Breno Leitao, Pavel Begunkov,
Arnd Bergmann, Kanchan Joshi, Anuj Gupta, Geert Uytterhoeven,
io-uring, linux-kernel
On Mon, May 08, 2023 at 09:08:18AM +0200, Arnd Bergmann wrote:
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] io_uring: add dummy io_uring_sqe_cmd() helper
2023-05-08 14:40 ` Christoph Hellwig
@ 2023-05-08 18:10 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2023-05-08 18:10 UTC (permalink / raw)
To: Christoph Hellwig, Arnd Bergmann
Cc: Keith Busch, Breno Leitao, Pavel Begunkov, Arnd Bergmann,
Kanchan Joshi, Anuj Gupta, Geert Uytterhoeven, io-uring,
linux-kernel
On 5/8/23 8:40 AM, Christoph Hellwig wrote:
> On Mon, May 08, 2023 at 09:08:18AM +0200, Arnd Bergmann wrote:
>> 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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-08 18:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-08 7:08 [PATCH] io_uring: add dummy io_uring_sqe_cmd() helper Arnd Bergmann
2023-05-08 14:40 ` Christoph Hellwig
2023-05-08 18:10 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox