Message ID | 20230724121823.1357562-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp1766221vqg; Mon, 24 Jul 2023 05:30:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlEbn2SCJK5WLMvtEUE3WodAOS25V/Fb1jlJ85Tyjr4b4P1CmB12lvAGPQoDngbidHu8fDbT X-Received: by 2002:a17:903:11c8:b0:1ae:8892:7d27 with SMTP id q8-20020a17090311c800b001ae88927d27mr12705412plh.42.1690201845156; Mon, 24 Jul 2023 05:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690201845; cv=none; d=google.com; s=arc-20160816; b=XWGo5Xbb5QnYNUYcDMRpJ0sUuYuUrhAjPNfE5MjfhbfBz5zm1UODsOZvzNwthHizf1 YFQqGibHCpFsrLpr+mTonsqWofd4fL8BNecxj75bGLpMPwIEqsc+eRwhKD6YFozZRqlF 7FC8eWIKy4+hwKzdqdYv7XVl9tcXlWUIIOYtJ7SpIspt8Gq0QCzAZdJo8JQ0cGHX5cb3 6rsUVwZJhnH9pkP/8t9uBDXC//DonU2YWJFZOnx09rZyoUG9nSijKW08OVoTWiVAgd9E k1h9RVZx4zCCvVA9Pe7CPTNtuwimrIZcfDcktNuIgOVhLQiMbqfpJHGQEI4LKwlbp0RU 3lKw== 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=fVBJNvo0vpEOVvbi8tDH1SUCnXDkNFPI+kemETRFq+U=; fh=xL82IOqQdfdNiudujm9n8zcaD6Z4+1QBDj4sXt+muv4=; b=FXZsc12JmSEgTvKpbL8k07r5+5pH1udkyrkkdpDO8mNZi+jqvjDwkk7S7MaAhdA/1M ywfisJyC/9MYw9HkEL5qQpsAVwpQoc6PdyM4M6DBS9kmVBp6iZetE/WmFDDNDwAtEtep Q/WhVkIPxMf7LbJiaSRb8mJs+Ud8Z4bp9mOUdnytDSyMf0gpHZb4EYPocblxsNlQrXIn TEubwYtCRvo+HSGgp3YjEC2fBDUcmv63jKnwQEgjZdsSrvtR1sDw2ltzH+AZ04xzk9W/ fcXXBdXm+cJOdpw4WQ2X9hsPLrzR1TfiHJswDUz4Cy3Iu+mSKKEKUWRCgk3qiiTuwPZ0 4khg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qc1oPZGL; 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 z10-20020a170903018a00b001b9d03d0dcasi9527468plg.143.2023.07.24.05.30.31; Mon, 24 Jul 2023 05:30:45 -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=Qc1oPZGL; 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 S230470AbjGXMTO (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Mon, 24 Jul 2023 08:19:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230458AbjGXMSx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Jul 2023 08:18:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FF8F1BFB for <linux-kernel@vger.kernel.org>; Mon, 24 Jul 2023 05:18:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 21ED261124 for <linux-kernel@vger.kernel.org>; Mon, 24 Jul 2023 12:18:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7062EC433C9; Mon, 24 Jul 2023 12:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690201108; bh=45Se94dVdCFvx+5A8Mg8jjIemAM8HzFY/Qq3WqvS/Bk=; h=From:To:Cc:Subject:Date:From; b=Qc1oPZGLNJH1Km8MPHyzHZaxb8mD43sAp4g8VKyN7oPUXoA75Hf6LrR7WGsX1HzXt 1FsBi+NbH6djpiLlqWgtc/TYjqomaQziy642wxU0y+M7G/3BAE6ZuUjWE1rsxnMuWz tAEFTXkxNvMhw0HK4Qe1zFL8PqOXadTgTBRPXEgk4R6jpu/8K+X8m4NkMr3hEAEFb1 5e6jX4z/3LIB6a6a491Zm29vnzjnLLV32Csf994rL9ZeJ7Iru7plwB0+sdDH4pQOTm /fjrorE1pEtoY+lJVrSJh9LjWc17m1PaT1cA3t7no7xniMNo99DFHyrUSjCmRgIA8O G3BmTjZhncoSQ== From: Arnd Bergmann <arnd@kernel.org> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Tejun Heo <tj@kernel.org>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, Suren Baghdasaryan <surenb@google.com>, Andrew Morton <akpm@linux-foundation.org>, Johannes Weiner <hannes@cmpxchg.org> Cc: Arnd Bergmann <arnd@arndb.de>, Chengming Zhou <zhouchengming@bytedance.com>, linux-kernel@vger.kernel.org Subject: [PATCH] kernfs: add stub helper for kernfs_generic_poll() Date: Mon, 24 Jul 2023 14:18:16 +0200 Message-Id: <20230724121823.1357562-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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: INBOX X-GMAIL-THRID: 1772305089817477781 X-GMAIL-MSGID: 1772305089817477781 |
Series |
kernfs: add stub helper for kernfs_generic_poll()
|
|
Commit Message
Arnd Bergmann
July 24, 2023, 12:18 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> In some randconfig builds, kernfs ends up being disabled, so there is no prototype for kernfs_generic_poll() In file included from kernel/sched/build_utility.c:97: kernel/sched/psi.c:1479:3: error: implicit declaration of function 'kernfs_generic_poll' is invalid in C99 [-Werror,-Wimplicit-function-declaration] kernfs_generic_poll(t->of, wait); ^ Add a stub helper for it, as we have it for other kernfs functions. Fixes: aff037078ecae ("sched/psi: use kernfs polling functions for PSI trigger polling") Fixes: 147e1a97c4a0b ("fs: kernfs: add poll file operation") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- While the stub was always missing, this only caused problems now that sched/psi.c calls it unconditionally. The patch that caused it was already merged into v6.5-rc2 --- include/linux/kernfs.h | 4 ++++ 1 file changed, 4 insertions(+)
Comments
On 2023/7/24 20:18, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > In some randconfig builds, kernfs ends up being disabled, so there is no prototype > for kernfs_generic_poll() > > In file included from kernel/sched/build_utility.c:97: > kernel/sched/psi.c:1479:3: error: implicit declaration of function 'kernfs_generic_poll' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > kernfs_generic_poll(t->of, wait); > ^ > > Add a stub helper for it, as we have it for other kernfs functions. > > Fixes: aff037078ecae ("sched/psi: use kernfs polling functions for PSI trigger polling") > Fixes: 147e1a97c4a0b ("fs: kernfs: add poll file operation") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > While the stub was always missing, this only caused problems now that sched/psi.c > calls it unconditionally. The patch that caused it was already merged into v6.5-rc2 > --- > include/linux/kernfs.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h > index 73f5c120def88..2a36f3218b510 100644 > --- a/include/linux/kernfs.h > +++ b/include/linux/kernfs.h > @@ -550,6 +550,10 @@ static inline int kernfs_setattr(struct kernfs_node *kn, > const struct iattr *iattr) > { return -ENOSYS; } > > +static inline __poll_t kernfs_generic_poll(struct kernfs_open_file *of, > + struct poll_table_struct *pt) > +{ return -ENOSYS; } > + > static inline void kernfs_notify(struct kernfs_node *kn) { } > > static inline int kernfs_xattr_get(struct kernfs_node *kn, const char *name, Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com> Thanks.
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index 73f5c120def88..2a36f3218b510 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h @@ -550,6 +550,10 @@ static inline int kernfs_setattr(struct kernfs_node *kn, const struct iattr *iattr) { return -ENOSYS; } +static inline __poll_t kernfs_generic_poll(struct kernfs_open_file *of, + struct poll_table_struct *pt) +{ return -ENOSYS; } + static inline void kernfs_notify(struct kernfs_node *kn) { } static inline int kernfs_xattr_get(struct kernfs_node *kn, const char *name,