Messages in this thread | | | Date | Mon, 25 Mar 2019 06:41:49 +0800 | From | kbuild test robot <> | Subject | [tip:ras/core 2/2] drivers/ras/debugfs.c:9:5: error: redefinition of 'ras_userspace_consumers' |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ras/core head: 56baf8bd6c92819b1d89210fbfac2c6327a1271b commit: 56baf8bd6c92819b1d89210fbfac2c6327a1271b [2/2] ras/debugfs: Fix -Wmissing-prototypes warnings config: x86_64-randconfig-x003-201912 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: git checkout 56baf8bd6c92819b1d89210fbfac2c6327a1271b # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
>> drivers/ras/debugfs.c:9:5: error: redefinition of 'ras_userspace_consumers' int ras_userspace_consumers(void) ^~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/ras/debugfs.c:2:0: include/linux/ras.h:14:19: note: previous definition of 'ras_userspace_consumers' was here static inline int ras_userspace_consumers(void) { return 0; } ^~~~~~~~~~~~~~~~~~~~~~~ >> drivers/ras/debugfs.c:39:12: error: redefinition of 'ras_add_daemon_trace' int __init ras_add_daemon_trace(void) ^~~~~~~~~~~~~~~~~~~~ In file included from drivers/ras/debugfs.c:2:0: include/linux/ras.h:16:19: note: previous definition of 'ras_add_daemon_trace' was here static inline int ras_add_daemon_trace(void) { return 0; } ^~~~~~~~~~~~~~~~~~~~ >> drivers/ras/debugfs.c:55:13: error: redefinition of 'ras_debugfs_init' void __init ras_debugfs_init(void) ^~~~~~~~~~~~~~~~ In file included from drivers/ras/debugfs.c:2:0: include/linux/ras.h:15:20: note: previous definition of 'ras_debugfs_init' was here static inline void ras_debugfs_init(void) { } ^~~~~~~~~~~~~~~~
vim +/ras_userspace_consumers +9 drivers/ras/debugfs.c
d963cd95 Chen, Gong 2014-06-11 8 d963cd95 Chen, Gong 2014-06-11 @9 int ras_userspace_consumers(void) d963cd95 Chen, Gong 2014-06-11 10 { d963cd95 Chen, Gong 2014-06-11 11 return atomic_read(&trace_count); d963cd95 Chen, Gong 2014-06-11 12 } d963cd95 Chen, Gong 2014-06-11 13 EXPORT_SYMBOL_GPL(ras_userspace_consumers); d963cd95 Chen, Gong 2014-06-11 14 d963cd95 Chen, Gong 2014-06-11 15 static int trace_show(struct seq_file *m, void *v) d963cd95 Chen, Gong 2014-06-11 16 { d963cd95 Chen, Gong 2014-06-11 17 return atomic_read(&trace_count); d963cd95 Chen, Gong 2014-06-11 18 } d963cd95 Chen, Gong 2014-06-11 19 d963cd95 Chen, Gong 2014-06-11 20 static int trace_open(struct inode *inode, struct file *file) d963cd95 Chen, Gong 2014-06-11 21 { d963cd95 Chen, Gong 2014-06-11 22 atomic_inc(&trace_count); d963cd95 Chen, Gong 2014-06-11 23 return single_open(file, trace_show, NULL); d963cd95 Chen, Gong 2014-06-11 24 } d963cd95 Chen, Gong 2014-06-11 25 d963cd95 Chen, Gong 2014-06-11 26 static int trace_release(struct inode *inode, struct file *file) d963cd95 Chen, Gong 2014-06-11 27 { d963cd95 Chen, Gong 2014-06-11 28 atomic_dec(&trace_count); d963cd95 Chen, Gong 2014-06-11 29 return single_release(inode, file); d963cd95 Chen, Gong 2014-06-11 30 } d963cd95 Chen, Gong 2014-06-11 31 d963cd95 Chen, Gong 2014-06-11 32 static const struct file_operations trace_fops = { d963cd95 Chen, Gong 2014-06-11 33 .open = trace_open, d963cd95 Chen, Gong 2014-06-11 34 .read = seq_read, d963cd95 Chen, Gong 2014-06-11 35 .llseek = seq_lseek, d963cd95 Chen, Gong 2014-06-11 36 .release = trace_release, d963cd95 Chen, Gong 2014-06-11 37 }; d963cd95 Chen, Gong 2014-06-11 38 d963cd95 Chen, Gong 2014-06-11 @39 int __init ras_add_daemon_trace(void) d963cd95 Chen, Gong 2014-06-11 40 { d963cd95 Chen, Gong 2014-06-11 41 struct dentry *fentry; d963cd95 Chen, Gong 2014-06-11 42 d963cd95 Chen, Gong 2014-06-11 43 if (!ras_debugfs_dir) d963cd95 Chen, Gong 2014-06-11 44 return -ENOENT; d963cd95 Chen, Gong 2014-06-11 45 d963cd95 Chen, Gong 2014-06-11 46 fentry = debugfs_create_file("daemon_active", S_IRUSR, ras_debugfs_dir, d963cd95 Chen, Gong 2014-06-11 47 NULL, &trace_fops); d963cd95 Chen, Gong 2014-06-11 48 if (!fentry) d963cd95 Chen, Gong 2014-06-11 49 return -ENODEV; d963cd95 Chen, Gong 2014-06-11 50 d963cd95 Chen, Gong 2014-06-11 51 return 0; d963cd95 Chen, Gong 2014-06-11 52 d963cd95 Chen, Gong 2014-06-11 53 } d963cd95 Chen, Gong 2014-06-11 54 d963cd95 Chen, Gong 2014-06-11 @55 void __init ras_debugfs_init(void)
:::::: The code at line 9 was first introduced by commit :::::: d963cd95bea93b7db9390a71d1e2cabbb3b2c3ea RAS, debugfs: Add debugfs interface for RAS subsystem
:::::: TO: Chen, Gong <gong.chen@linux.intel.com> :::::: CC: Tony Luck <tony.luck@intel.com>
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation [unhandled content-type:application/gzip] | |