Message ID | 20230508070825.3659621-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1975848vqo; Mon, 8 May 2023 00:39:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4uFcuD/eHLA5L+Yq1bPmU5f+4ANwhQIR9PPixPK9ZptUpkdvMDYYgcaM7mkiPLxVH3yIM9 X-Received: by 2002:a05:6a20:728d:b0:100:47a5:d754 with SMTP id o13-20020a056a20728d00b0010047a5d754mr3966694pzk.23.1683531596920; Mon, 08 May 2023 00:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683531596; cv=none; d=google.com; s=arc-20160816; b=qKu//wIaHVM2Q9VITucNQGPitU5RksXhiZxxfdnF5pU+0q75N3TVTfM8b4VKO9w+dd l92sMhCL8n/tkbmaBa2pPGjE5QGII3NPqRJso/0A4btmCdjotNQ17P0IMTkKm0J8ykZ0 oxPgTFSqLC7GZ7ORRq1tsAUFSLXBzf91dSfwU/j8xu04CQYcJcI8FPixiarTQ62Codzf PO5hUamVK3hw/SwTdN3eoc8j0q7YErHSUCi4SkIUyL7eRbLSsiOEnrPDF1NnJYkyoU/G MluyHCWwa+6kdHZUi/EgrrUiWhNvWAKJuwjre92YTw9i9bJfpM8uIYOxRUtWS50lEK+x ScIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rFTASZaXxQ8eltbIMFwAuSn+khZvEjKZawN13i12yjo=; b=tAcQBWmgcMqjgnrdPTnWEL/hdKUzRquNXqhG52lzErS356Ddnr1D/H+xFxlvxVGQRq qeIS/7QJeVIx1mpu1xxNZesft4GoGq+9TPVQ4BC2QXYbrgZlSfQFfRNDzRTRoixPka6Y Bzbc2I9mW8kBZbkC6zNGm8dEjAE86O5+lGiD0ZXj7SCYs9OZsdHuXnPmVrM0BWnjsRWB sAhQo3YkGxUstC33g/+n/29267JlT+uM0ArH/FXO/0hCnqHeo3NlIB/QnF5VqOR2asUm dkW2un5hNgCbEYMHzim0W5xKOhMA+11sxg7mjl+2QQ5Mp6PnLMFQJHdisJHZr2Mm72x7 qWcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HBc8kLKo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a63f110000000b00524da606617si7912479pgi.233.2023.05.08.00.39.40; Mon, 08 May 2023 00:39:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HBc8kLKo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233210AbjEHHJr (ORCPT <rfc822;baris.duru.linux@gmail.com> + 99 others); Mon, 8 May 2023 03:09:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233050AbjEHHJ3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 8 May 2023 03:09:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 304DA1A492; Mon, 8 May 2023 00:09:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0B75561E9A; Mon, 8 May 2023 07:08:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E5E0C433EF; Mon, 8 May 2023 07:08:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683529710; bh=+3W5Mv5xX/kx/ta/ix62WAEEVv/SvGa7b/nAH0LLghM=; h=From:To:Cc:Subject:Date:From; b=HBc8kLKoeZxm0sVitUx8Nt7ML5tEi2FZvBm7xEMaj0xk0+QmkvGjrd4yXORCvwi2m eG/ds4BvGYXhaYxMiJYjeVtUr8ppfkiKnWSGu3rQqp1UfGdNVq+qoYBcTrhn5ZBaeU zeSVzpJSHsbpMSroGk+tKjsX1LhBNFy0YLZG+bomQ71KIeYD1rgLiFsyO46+Ki2sWk 6aAwdN1LPHKfISUM9YQi538NVnSFcu1GbSMd/aNSj4R3sY0/tdkWomoG6y9lamgPEi dJeWB3TNzVCUYLdccHbtoUJKFDsBCi7e5rr5rkogOKq7KQsiQu88txeojb/KTRWvwm YxsTUAO4eH+vg== From: Arnd Bergmann <arnd@kernel.org> To: Jens Axboe <axboe@kernel.dk>, Keith Busch <kbusch@kernel.org>, Breno Leitao <leitao@debian.org>, Pavel Begunkov <asml.silence@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de>, Kanchan Joshi <joshi.k@samsung.com>, Anuj Gupta <anuj20.g@samsung.com>, Geert Uytterhoeven <geert+renesas@glider.be>, io-uring@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] io_uring: add dummy io_uring_sqe_cmd() helper Date: Mon, 8 May 2023 09:08:18 +0200 Message-Id: <20230508070825.3659621-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765310827923602020?= X-GMAIL-MSGID: =?utf-8?q?1765310827923602020?= |
Series |
io_uring: add dummy io_uring_sqe_cmd() helper
|
|
Commit Message
Arnd Bergmann
May 8, 2023, 7:08 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de> 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@arndb.de> --- include/linux/io_uring.h | 4 ++++ 1 file changed, 4 insertions(+)
Comments
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.
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.
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