Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp8155791pxb; Fri, 19 Feb 2021 08:42:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoJIgpDqkINF0qczZR/lploAUGeCqhLsMYwj3x7/tCVB7zBWbC/HUOHWfmWbCfToBs8GWs X-Received: by 2002:aa7:d9d7:: with SMTP id v23mr5941982eds.320.1613752949066; Fri, 19 Feb 2021 08:42:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613752949; cv=none; d=google.com; s=arc-20160816; b=TeJHhFy3ZetM3iM2ma3hRwxPDBmcdWJAI2h7JSeArnTkVQ/p/MhPGcH/j8w+1PlL3A G89g29jiIQRhOXcu6X02omtR9MS9k+OrSOr1X4ZnTKdVrbM71L2BusxpWN3mVsZcTy3U B2tisGJJ4NSuLKnrh2K2rX0z/tj6mAVkp4We4JAkQpEJKmNJ8FW50iI8HJioPfvQ8Elw PfZiy8HZAjfyrB1l3a04+XWi3B5e41deQTmk33rNpCC/PdSyBQx5kR/Db/8Lc0lOdBUy rDX+sv2eRtCqvNPro57ki2A31tmzIIo8a55DbqFEe2pVdzRvAEYVoJmBDM+S0tzEB7Qv EPHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=QopIIrFF742BKqlOh4+TqmLjkxOTaJiQM9hc+/gnVxg=; b=ofJlfImQ+kgxiY4kTsnF+r83+O97yRZYmfVyWoRZhzKq4mBsx1cFn1xn0PVxFz3+x+ x6FZS0BNmL4D3nmcZh2XNyWbBRuhsQOWGfSdXJNR86b6qRsddNfmYdDAxwZoRbP5NDuC BHP1nWEYIsrJlxpHGRGHG3hHkreC8FxI9MZJfxD3uhXtF6c8E2PaPTcCHli9KnGXj5Tp bzY8aBO2yr3XHbqDsiGoWIGFQw1h7SSmI5QL81oecYZ88VwjRlDqrLwN1tC8466hHVfr rW10nVvpGRJU/7CE73GdfXAoD8rp2KvHNBc1kMS8d4bm9qrrh+Sgf8rR2LRMJRNi8Wo/ pvUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=xldRnNMt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id el22si5948427ejc.714.2021.02.19.08.42.05; Fri, 19 Feb 2021 08:42:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=xldRnNMt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230138AbhBSQim (ORCPT + 99 others); Fri, 19 Feb 2021 11:38:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbhBSQi3 (ORCPT ); Fri, 19 Feb 2021 11:38:29 -0500 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84E2FC06178A for ; Fri, 19 Feb 2021 08:37:48 -0800 (PST) Received: by mail-il1-x134.google.com with SMTP id d20so4990437ilo.4 for ; Fri, 19 Feb 2021 08:37:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QopIIrFF742BKqlOh4+TqmLjkxOTaJiQM9hc+/gnVxg=; b=xldRnNMtCqOBtzAdSkbWqDWK1ZbBF6xEYQZCfkn3Y7jcOIl3VVDqypJDMNaSi54KE1 w5LVCAGlgEGfzdrZ86fr6IYN3EPax5C50K8P9YGyH/PbZ8Zx/hY+CcxcvvcchvODNXc2 WyorXES1uKg5brfvrOuCQ9Ht4vWMeJGjFEO4hmvtMwWoEPHyuh1tfidic+3IF3ctBVet KDCu+30h/EzmrPC3/j8Sqjhcru3Z1CLS3vGB5FZryibLYYvzatBb7tPPkHfEUXFkobqm Q4nit8t2eBFzFSSdjciLL3gsu9vjwjHTERF2kHJrZViI4kb20kuxpp0LRFLcw/GBHMaD BUZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QopIIrFF742BKqlOh4+TqmLjkxOTaJiQM9hc+/gnVxg=; b=DTWpLXZ+GMFE7RgCrkgg1GanJiFFQ9s0l6hgtR7cW7tCBueHmBuL6xkHzFwB4zZ65M wmai5gZ08+Qs/bhWCv8FLmMEnGj9I/t7jNPMqW1yzEU/XbE2TSh7xUXdS0Oe0Eg0vn1w JroVk8WaFY6muTU70GXr8BO3DR0i+roAFLh3bpJuNOdFUm0J6D/NoQqgJj7eS+MuEe7/ Ka9U22SHg/2kFyAGRlliKb0GZIz6LWiv+ifGtvGElM5lW/VVwH9+E1f+kckPG93nkIO3 Xdmn8sof3y3Zp4VG2AkUYxt4TVf/kya51TMy42oK2CbsUjoTEiuCC8AJ1dd5nlbmIZr1 /6tQ== X-Gm-Message-State: AOAM532kcbxqGh/BqPZHFJptEj5c7hVFT5om5j5lfnx0Rn19OKzq9Vcm nLqdI0WAb521EEPkWZaMeEc/Yw== X-Received: by 2002:a05:6e02:13eb:: with SMTP id w11mr4524720ilj.103.1613752667719; Fri, 19 Feb 2021 08:37:47 -0800 (PST) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id g3sm6741393ile.10.2021.02.19.08.37.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Feb 2021 08:37:47 -0800 (PST) Subject: Re: [next]: fs/io_uring.c:6171:10: error: implicit declaration of function 'io_sendmsg_prep_async'; did you mean 'io_req_prep_async'? To: Naresh Kamboju , linux-mips@vger.kernel.org, Linux-Next Mailing List , io-uring@vger.kernel.org, open list , Linux ARM , lkft-triage@lists.linaro.org Cc: Stephen Rothwell , Pavel Begunkov References: From: Jens Axboe Message-ID: Date: Fri, 19 Feb 2021 09:37:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/19/21 9:08 AM, Naresh Kamboju wrote: > Linux next tag 20210219 arm and mips builds failed due to below error. > > Following build configs failed > arm (s3c6400_defconfig) with gcc-8 > arm (s3c6400_defconfig) with gcc-9 > arm (s3c6400_defconfig) with gcc-10 > > mips (e55_defconfig) with gcc-8 > mips (e55_defconfig) with gcc-9 > mips (e55_defconfig) with gcc-10 > > fs/io_uring.c:6171:10: error: implicit declaration of function > 'io_sendmsg_prep_async'; did you mean 'io_req_prep_async'? > [-Werror=implicit-function-declaration] > return io_sendmsg_prep_async(req); > ^~~~~~~~~~~~~~~~~~~~~ > io_req_prep_async > > Reported-by: Naresh Kamboju This should fix it, cleaning it up a bit at the same time. commit b1c892df32ebf6f30c995e23dcafeae2392ad1bc Author: Jens Axboe Date: Fri Feb 19 09:35:19 2021 -0700 io_uring: make the !CONFIG_NET helpers a bit more robust With the prep and prep async split, we now have potentially 3 helpers that need to be defined for !CONFIG_NET. Add some helpers to do just that. Fixes the following compile error on !CONFIG_NET: fs/io_uring.c:6171:10: error: implicit declaration of function 'io_sendmsg_prep_async'; did you mean 'io_req_prep_async'? [-Werror=implicit-function-declaration] return io_sendmsg_prep_async(req); ^~~~~~~~~~~~~~~~~~~~~ io_req_prep_async Fixes: 93642ef88434 ("io_uring: split sqe-prep and async setup") Reported-by: Naresh Kamboju Signed-off-by: Jens Axboe diff --git a/fs/io_uring.c b/fs/io_uring.c index b7bae301744b..c9a5c498dc3b 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5127,56 +5127,32 @@ static int io_connect(struct io_kiocb *req, unsigned int issue_flags) return 0; } #else /* !CONFIG_NET */ -static int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) -{ - return -EOPNOTSUPP; -} - -static int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags) -{ - return -EOPNOTSUPP; -} - -static int io_send(struct io_kiocb *req, unsigned int issue_flags) -{ - return -EOPNOTSUPP; -} - -static int io_recvmsg_prep(struct io_kiocb *req, - const struct io_uring_sqe *sqe) -{ - return -EOPNOTSUPP; -} - -static int io_recvmsg(struct io_kiocb *req, unsigned int issue_flags) -{ - return -EOPNOTSUPP; -} - -static int io_recv(struct io_kiocb *req, unsigned int issue_flags) -{ - return -EOPNOTSUPP; -} - -static int io_accept_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) -{ - return -EOPNOTSUPP; -} - -static int io_accept(struct io_kiocb *req, unsigned int issue_flags) -{ - return -EOPNOTSUPP; -} - -static int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) -{ - return -EOPNOTSUPP; -} - -static int io_connect(struct io_kiocb *req, unsigned int issue_flags) -{ - return -EOPNOTSUPP; -} +#define IO_NETOP_FN(op) \ +static int io_##op(struct io_kiocb *req, unsigned int issue_flags) \ +{ \ + return -EOPNOTSUPP; \ +} + +#define IO_NETOP_PREP(op) \ +IO_NETOP_FN(op) \ +static int io_##op##_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) \ +{ \ + return -EOPNOTSUPP; \ +} \ + +#define IO_NETOP_PREP_ASYNC(op) \ +IO_NETOP_PREP(op) \ +static int io_##op##_prep_async(struct io_kiocb *req) \ +{ \ + return -EOPNOTSUPP; \ +} + +IO_NETOP_PREP_ASYNC(sendmsg); +IO_NETOP_PREP_ASYNC(recvmsg); +IO_NETOP_PREP_ASYNC(connect); +IO_NETOP_PREP(accept); +IO_NETOP_FN(send); +IO_NETOP_FN(recv); #endif /* CONFIG_NET */ struct io_poll_table { -- Jens Axboe