All of lore.kernel.org
 help / color / mirror / Atom feed
From: lingfuyi <lingfuyi@126.com>
To: asml.silence@gmail.com, axboe@kernel.dk
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
	lingfuyi <lingfuyi@126.com>, k2ci <kernel-bot@kylinos.cn>
Subject: [PATCH] io_uring: fix compile error when CONFIG_IO_URING not set
Date: Tue, 23 May 2023 17:26:29 +0800	[thread overview]
Message-ID: <20230523092629.3402710-1-lingfuyi@126.com> (raw)

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 <kernel-bot@kylinos.cn>
Signed-off-by: lingfuyi <lingfuyi@126.com>
---
 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


             reply	other threads:[~2023-05-23  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23  9:26 lingfuyi [this message]
2023-05-23 17:06 ` [PATCH] io_uring: fix compile error when CONFIG_IO_URING not set Jens Axboe
2023-05-24  1:12 ` kernel test robot
2023-05-24  4:04 ` kernel test robot

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 \
    --in-reply-to=20230523092629.3402710-1-lingfuyi@126.com \
    --to=lingfuyi@126.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=kernel-bot@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.