From: Steven Rostedt <rostedt@goodmis.org>
To: Kusanagi Kouichi <slash@ac.auone-net.jp>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] debugfs: Fix !DEBUG_FS debugfs_create_automount
Date: Thu, 21 Nov 2019 18:53:39 -0500 [thread overview]
Message-ID: <20191121185339.4ef626df@oasis.local.home> (raw)
In-Reply-To: <20191121102021787.MLMY.25002.ppp.dion.ne.jp@dmta0003.auone-net.jp>
On Thu, 21 Nov 2019 19:20:21 +0900
Kusanagi Kouichi <slash@ac.auone-net.jp> wrote:
> If DEBUG_FS=n, compile fails with the following error:
>
> kernel/trace/trace.c: In function 'tracing_init_dentry':
> kernel/trace/trace.c:8658:9: error: passing argument 3 of 'debugfs_create_automount' from incompatible pointer type [-Werror=incompatible-pointer-types]
> 8658 | trace_automount, NULL);
> | ^~~~~~~~~~~~~~~
> | |
> | struct vfsmount * (*)(struct dentry *, void *)
> In file included from kernel/trace/trace.c:24:
> ./include/linux/debugfs.h:206:25: note: expected 'struct vfsmount * (*)(void *)' but argument is of type 'struct vfsmount * (*)(struct dentry *, void *)'
> 206 | struct vfsmount *(*f)(void *),
> | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
>
Please add the tag:
Reported-by: kbuild test robot <lkp@intel.com>
You can also add:
Link: https://lore.kernel.org/lkml/201911211354.zYtbB4MD%25lkp@intel.com/
-- Steve
> Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
> ---
> include/linux/debugfs.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
> index 58424eb3b329..798f0b9b43ae 100644
> --- a/include/linux/debugfs.h
> +++ b/include/linux/debugfs.h
> @@ -54,6 +54,8 @@ static const struct file_operations __fops = { \
> .llseek = no_llseek, \
> }
>
> +typedef struct vfsmount *(*debugfs_automount_t)(struct dentry *, void *);
> +
> #if defined(CONFIG_DEBUG_FS)
>
> struct dentry *debugfs_lookup(const char *name, struct dentry *parent);
> @@ -75,7 +77,6 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
> struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent,
> const char *dest);
>
> -typedef struct vfsmount *(*debugfs_automount_t)(struct dentry *, void *);
> struct dentry *debugfs_create_automount(const char *name,
> struct dentry *parent,
> debugfs_automount_t f,
> @@ -203,7 +204,7 @@ static inline struct dentry *debugfs_create_symlink(const char *name,
>
> static inline struct dentry *debugfs_create_automount(const char *name,
> struct dentry *parent,
> - struct vfsmount *(*f)(void *),
> + debugfs_automount_t f,
> void *data)
> {
> return ERR_PTR(-ENODEV);
next prev parent reply other threads:[~2019-11-21 23:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 10:20 [PATCH] debugfs: Fix !DEBUG_FS debugfs_create_automount Kusanagi Kouichi
2019-11-21 11:52 ` Greg Kroah-Hartman
2019-11-21 12:44 ` Kusanagi Kouichi
2019-11-21 13:26 ` Greg Kroah-Hartman
2019-11-21 23:55 ` Steven Rostedt
2019-11-22 15:19 ` Greg Kroah-Hartman
2019-11-24 1:11 ` Steven Rostedt
2019-11-21 23:53 ` Steven Rostedt [this message]
2019-11-22 16:20 ` Al Viro
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=20191121185339.4ef626df@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rafael@kernel.org \
--cc=slash@ac.auone-net.jp \
/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