[openeuler:OLK-5.10 2882/2882] arch/x86/events/amd/core.c:716:24: warning: variable 'hwc' set but not used

tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 4fdf755b0cabc80fc65da83c9da27ec2cee144dc commit: f760d3d70f9029c226c09529168977f860e83950 [2882/2882] perf/x86/amd: Add AMD Fam19h Branch Sampling support config: x86_64-randconfig-2002-20250501 (https://download.01.org/0day-ci/archive/20250702/202507020623.TJsJ79Ng-lkp@i...) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250702/202507020623.TJsJ79Ng-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/202507020623.TJsJ79Ng-lkp@intel.com/ All warnings (new ones prefixed by >>):
arch/x86/events/amd/core.c:716:24: warning: variable 'hwc' set but not used [-Wunused-but-set-variable] 716 | struct hw_perf_event *hwc; | ^ 1 warning generated.
vim +/hwc +716 arch/x86/events/amd/core.c 712 713 static void amd_pmu_enable_all(int added) 714 { 715 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
716 struct hw_perf_event *hwc; 717 int idx; 718 719 amd_brs_enable_all(); 720 721 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 722 hwc = &cpuc->events[idx]->hw; 723 724 /* only activate events which are marked as active */ 725 if (!test_bit(idx, cpuc->active_mask)) 726 continue; 727 728 amd_pmu_enable_event(cpuc->events[idx]); 729 } 730 } 731
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot