[arm-platforms:hack/ppi 9/24] drivers/perf/arm_spe_pmu.c:1225:6: warning: variable 'ret' is uninitialized when used here
kernel test robot
lkp at intel.com
Mon Apr 21 10:26:24 PDT 2025
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/ppi
head: 2017a5b657d38d470385b73ae1704eefe13bf2a5
commit: c4dc9ff02fe9b78fb6f5cead8defbb4e6d3b632c [9/24] perf: arm_spe_pmu: Convert to new IRQ affinity retrieval API
config: arm64-randconfig-002-20250422 (https://download.01.org/0day-ci/archive/20250422/202504220122.xk8VGIkc-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250422/202504220122.xk8VGIkc-lkp@intel.com/reproduce)
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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504220122.xk8VGIkc-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/perf/arm_spe_pmu.c:1225:6: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
1225 | if (ret) {
| ^~~
drivers/perf/arm_spe_pmu.c:1211:9: note: initialize the variable 'ret' to silence this warning
1211 | int ret, irq;
| ^
| = 0
1 warning generated.
vim +/ret +1225 drivers/perf/arm_spe_pmu.c
1205
1206 /* Driver and device probing */
1207 static int arm_spe_pmu_irq_probe(struct arm_spe_pmu *spe_pmu)
1208 {
1209 struct platform_device *pdev = spe_pmu->pdev;
1210 const struct cpumask *affinity;
1211 int ret, irq;
1212
1213 irq = platform_get_irq_affinity(pdev, 0, &affinity);
1214 if (irq < 0)
1215 return -ENXIO;
1216
1217 if (!irq_is_percpu(irq)) {
1218 dev_err(&pdev->dev, "expected PPI but got SPI (%d)\n", irq);
1219 return -EINVAL;
1220 }
1221
1222 if (!affinity)
1223 affinity = cpu_possible_mask;
1224
> 1225 if (ret) {
1226 dev_err(&pdev->dev, "failed to get PPI partition (%d)\n", irq);
1227 return -EINVAL;
1228 }
1229
1230 cpumask_copy(&spe_pmu->supported_cpus, affinity);
1231
1232 spe_pmu->irq = irq;
1233 return 0;
1234 }
1235
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list