mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chengming Zhou <zhouchengming@bytedance.com>
To: Arnd Bergmann <arnd@kernel.org>,
	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>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernfs: add stub helper for kernfs_generic_poll()
Date: Mon, 24 Jul 2023 20:46:44 +0800	[thread overview]
Message-ID: <f562cf52-6251-25cf-7b33-a2135cdcc313@bytedance.com> (raw)
In-Reply-To: <20230724121823.1357562-1-arnd@kernel.org>

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.

      reply	other threads:[~2023-07-24 12:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 12:18 Arnd Bergmann
2023-07-24 12:46 ` Chengming Zhou [this message]

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=f562cf52-6251-25cf-7b33-a2135cdcc313@bytedance.com \
    --to=zhouchengming@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=surenb@google.com \
    --cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®