Re: [PATCH] tracing: Remove unnecessary DEBUG_FS dependency

From: kbuild test robot
Date: Thu Nov 21 2019 - 00:10:58 EST


Hi Kusanagi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/perf/core]
[also build test ERROR on v5.4-rc8 next-20191120]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Kusanagi-Kouichi/tracing-Remove-unnecessary-DEBUG_FS-dependency/20191121-032827
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 8f6ee51d772d0dab407d868449d2c5d9c8d2b6fc
config: arm-exynos_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

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]
trace_automount, NULL);
^~~~~~~~~~~~~~~
In file included from kernel/trace/trace.c:24:0:
include/linux/debugfs.h:204:30: note: expected 'struct vfsmount * (*)(void *)' but argument is of type 'struct vfsmount * (*)(struct dentry *, void *)'
static inline struct dentry *debugfs_create_automount(const char *name,
^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +/debugfs_create_automount +8658 kernel/trace/trace.c

f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 8630)
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8631) /**
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8632) * tracing_init_dentry - initialize top level trace array
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8633) *
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8634) * This is called when creating files or directories in the tracing
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8635) * directory. It is called via fs_initcall() by any of the boot up code
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8636) * and expects to return the dentry of the top level tracing directory.
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8637) */
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8638) struct dentry *tracing_init_dentry(void)
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8639) {
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8640) struct trace_array *tr = &global_trace;
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8641)
f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 8642) /* The top level trace array uses NULL as parent */
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8643) if (tr->dir)
f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 8644) return NULL;
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8645)
8b1291994d8e5e Jiaxing Wang 2015-11-06 8646 if (WARN_ON(!tracefs_initialized()) ||
8b1291994d8e5e Jiaxing Wang 2015-11-06 8647 (IS_ENABLED(CONFIG_DEBUG_FS) &&
8b1291994d8e5e Jiaxing Wang 2015-11-06 8648 WARN_ON(!debugfs_initialized())))
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8649) return ERR_PTR(-ENODEV);
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8650)
f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 8651) /*
f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 8652) * As there may still be users that expect the tracing
f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 8653) * files to exist in debugfs/tracing, we must automount
f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 8654) * the tracefs file system there, so older tools still
f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 8655) * work with the newer kerenl.
f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 8656) */
f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 8657) tr->dir = debugfs_create_automount("tracing", NULL,
f76180bc07abc3 Steven Rostedt (Red Hat 2015-01-20 @8658) trace_automount, NULL);
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8659)
8434dc9340cd2e Steven Rostedt (Red Hat 2015-01-20 8660) return NULL;
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8661) }
7eeafbcab47fe9 Steven Rostedt (Red Hat 2015-01-26 8662)

:::::: The code at line 8658 was first introduced by commit
:::::: f76180bc07abc399977bfbe8c43bf58c4570e893 tracing: Automatically mount tracefs on debugfs/tracing

:::::: TO: Steven Rostedt (Red Hat) <rostedt@xxxxxxxxxxx>
:::::: CC: Steven Rostedt <rostedt@xxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip