Re: [PATCH] debugfs: Fix !DEBUG_FS debugfs_create_automount

From: Greg Kroah-Hartman
Date: Thu Nov 21 2019 - 06:52:37 EST


On Thu, Nov 21, 2019 at 07:20:21PM +0900, Kusanagi Kouichi 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 *),
> | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
>
> Signed-off-by: Kusanagi Kouichi <slash@xxxxxxxxxxxxxxx>
> ---
> include/linux/debugfs.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)

Has this always been a problem, or did it just show up due to some other
kernel change?

thanks,

greg k-h