[openeuler:openEuler-1.0-LTS 1943/1943] arch/x86/events/zhaoxin/core.c:505:1: warning: attribute declaration must precede definition
Hi LeoLiu-oc, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 49bc452fdcb1e9ec3f9bb20cd3e15b865a2933fd commit: 0ce7c3b6e8a986ee9ef92a07ae18964835446c07 [1943/1943] x86/perf: Add hardware performance events support for Zhaoxin CPU. config: x86_64-randconfig-005-20251216 (https://download.01.org/0day-ci/archive/20251216/202512161945.q1Ihd2Pk-lkp@i...) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 1335a05ab8bc8339ce24be3a9da89d8c3f4e0571) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251216/202512161945.q1Ihd2Pk-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/202512161945.q1Ihd2Pk-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from <built-in>:2: In file included from include/linux/compiler_types.h:59: include/linux/compiler-clang.h:20:9: warning: '__SANITIZE_ADDRESS__' macro redefined [-Wmacro-redefined] 20 | #define __SANITIZE_ADDRESS__ | ^ <built-in>:354:9: note: previous definition is here 354 | #define __SANITIZE_ADDRESS__ 1 | ^
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) | ^ 3 warnings and 1 error generated.
vim +505 arch/x86/events/zhaoxin/core.c 504
505 __init int zhaoxin_pmu_init(void)
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot