Hi LeoLiu-oc,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d047cc727adb896a530936ced8c98485e6654a11 commit: 0ce7c3b6e8a986ee9ef92a07ae18964835446c07 [1291/1291] x86/perf: Add hardware performance events support for Zhaoxin CPU. config: x86_64-randconfig-013-20241113 (https://download.01.org/0day-ci/archive/20241113/202411131657.OqTk2Uu6-lkp@i...) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241113/202411131657.OqTk2Uu6-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202411131657.OqTk2Uu6-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/x86/events/zhaoxin/core.c:505:1: warning: attribute declaration must precede definition [-Wignored-attributes] 505 | __init int zhaoxin_pmu_init(void) | ^ include/linux/init.h:50:17: note: expanded from macro '__init' 50 | #define __init __section(.init.text) __cold __latent_entropy __noinitretpoline | ^ include/linux/compiler_types.h:222:38: note: expanded from macro '__section' 222 | #define __section(S) __attribute__((__section__(#S))) | ^ arch/x86/events/zhaoxin/../perf_event.h:1054:19: note: previous definition is here 1054 | static inline int zhaoxin_pmu_init(void) | ^ arch/x86/events/zhaoxin/core.c:505:1: warning: attribute declaration must precede definition [-Wignored-attributes] 505 | __init int zhaoxin_pmu_init(void) | ^ include/linux/init.h:50:39: note: expanded from macro '__init' 50 | #define __init __section(.init.text) __cold __latent_entropy __noinitretpoline | ^ include/linux/compiler_types.h:221:33: note: expanded from macro '__cold' 221 | #define __cold __attribute__((cold)) | ^ arch/x86/events/zhaoxin/../perf_event.h:1054:19: note: previous definition is here 1054 | static inline int zhaoxin_pmu_init(void) | ^
arch/x86/events/zhaoxin/core.c:505:12: error: redefinition of 'zhaoxin_pmu_init'
505 | __init int zhaoxin_pmu_init(void) | ^ arch/x86/events/zhaoxin/../perf_event.h:1054:19: note: previous definition is here 1054 | static inline int zhaoxin_pmu_init(void) | ^ 2 warnings and 1 error generated.
vim +/zhaoxin_pmu_init +505 arch/x86/events/zhaoxin/core.c
504
505 __init int zhaoxin_pmu_init(void)