public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring: fix compile error when CONFIG_IO_URING not set
@ 2023-05-23  9:26 lingfuyi
  2023-05-23 17:06 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: lingfuyi @ 2023-05-23  9:26 UTC (permalink / raw)
  To: asml.silence, axboe; +Cc: io-uring, linux-kernel, lingfuyi, k2ci

when compile with ARCH=mips CROSS_COMPILE=mips-linux-gnu- , and CONFIG_IO_URING
is not set , compile will case some error like this:
drivers/nvme/host/ioctl.c:555:37: error: initialization of
‘const struct nvme_uring_cmd *’ from ‘int’ makes pointer from
integer without a cast [-Werror=int-conversion]

Reported-by: k2ci <[email protected]>
Signed-off-by: lingfuyi <[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 7fe31b2cd02f..c76809f59617 100644
--- a/include/linux/io_uring.h
+++ b/include/linux/io_uring.h
@@ -98,6 +98,10 @@ static inline void io_uring_files_cancel(void)
 static inline void io_uring_free(struct task_struct *tsk)
 {
 }
+static inline const void *io_uring_sqe_cmd(const struct io_uring_sqe *sqe)
+{
+       return NULL;
+}
 static inline const char *io_uring_get_opcode(u8 opcode)
 {
 	return "";
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] io_uring: fix compile error when CONFIG_IO_URING not set
  2023-05-23  9:26 [PATCH] io_uring: fix compile error when CONFIG_IO_URING not set lingfuyi
@ 2023-05-23 17:06 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2023-05-23 17:06 UTC (permalink / raw)
  To: lingfuyi, asml.silence; +Cc: io-uring, linux-kernel, k2ci

On 5/23/23 3:26 AM, lingfuyi wrote:
> when compile with ARCH=mips CROSS_COMPILE=mips-linux-gnu- , and CONFIG_IO_URING
> is not set , compile will case some error like this:
> drivers/nvme/host/ioctl.c:555:37: error: initialization of
> ‘const struct nvme_uring_cmd *’ from ‘int’ makes pointer from
> integer without a cast [-Werror=int-conversion]

This was fixed weeks ago:

https://git.kernel.dk/cgit/linux/commit/?h=io_uring-6.4&id=293007b033418c8c9d1b35d68dec49a500750fde

and is also in 6.4 since -rc2.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-23 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23  9:26 [PATCH] io_uring: fix compile error when CONFIG_IO_URING not set lingfuyi
2023-05-23 17:06 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox