public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [arm64:for-next/perf 5/28] drivers/perf/dwc_pcie_pmu.c:418 dwc_pcie_pmu_validate_group() error: uninitialized symbol 'time_event'.
@ 2025-09-23  5:32 Dan Carpenter
  2025-09-23  7:55 ` Ilkka Koskinen
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2025-09-23  5:32 UTC (permalink / raw)
  To: oe-kbuild, Ilkka Koskinen
  Cc: lkp, oe-kbuild-all, linux-arm-kernel, Will Deacon

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/perf
head:   6d2f913fda5683fbd4c3580262e10386c1263dfb
commit: 71396cfac97d0249fa7d8dcc8e649b6ba4c090e4 [5/28] perf/dwc_pcie: Support counting multiple lane events in parallel
config: sparc64-randconfig-r072-20250922 (https://download.01.org/0day-ci/archive/20250923/202509231223.gZsX6Eio-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.5.0

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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202509231223.gZsX6Eio-lkp@intel.com/

smatch warnings:
drivers/perf/dwc_pcie_pmu.c:418 dwc_pcie_pmu_validate_group() error: uninitialized symbol 'time_event'.

vim +/time_event +418 drivers/perf/dwc_pcie_pmu.c

71396cfac97d02 Ilkka Koskinen 2025-08-28  401  static int dwc_pcie_pmu_validate_group(struct perf_event *event)
71396cfac97d02 Ilkka Koskinen 2025-08-28  402  {
71396cfac97d02 Ilkka Koskinen 2025-08-28  403  	struct perf_event *sibling, *leader = event->group_leader;
71396cfac97d02 Ilkka Koskinen 2025-08-28  404  	DECLARE_BITMAP(val_lane_events, 2 * DWC_PCIE_LANE_MAX_EVENTS_PER_GROUP);
71396cfac97d02 Ilkka Koskinen 2025-08-28  405  	bool time_event;
71396cfac97d02 Ilkka Koskinen 2025-08-28  406  	int type;
71396cfac97d02 Ilkka Koskinen 2025-08-28  407  
71396cfac97d02 Ilkka Koskinen 2025-08-28  408  	type = DWC_PCIE_EVENT_TYPE(leader);
71396cfac97d02 Ilkka Koskinen 2025-08-28  409  	if (type == DWC_PCIE_TIME_BASE_EVENT)
71396cfac97d02 Ilkka Koskinen 2025-08-28  410  		time_event = true;
71396cfac97d02 Ilkka Koskinen 2025-08-28  411  	else
71396cfac97d02 Ilkka Koskinen 2025-08-28  412  		if (dwc_pcie_pmu_validate_add_lane_event(leader, val_lane_events))
71396cfac97d02 Ilkka Koskinen 2025-08-28  413  			return -ENOSPC;
71396cfac97d02 Ilkka Koskinen 2025-08-28  414  
71396cfac97d02 Ilkka Koskinen 2025-08-28  415  	for_each_sibling_event(sibling, leader) {
71396cfac97d02 Ilkka Koskinen 2025-08-28  416  		type = DWC_PCIE_EVENT_TYPE(sibling);
71396cfac97d02 Ilkka Koskinen 2025-08-28  417  		if (type == DWC_PCIE_TIME_BASE_EVENT) {
71396cfac97d02 Ilkka Koskinen 2025-08-28 @418  			if (time_event)

time_event is never set to false.  I really encourage developers to
use CONFIG_INIT_STACK_ALL_PATTERN=y for testing.  (Use
CONFIG_INIT_STACK_ALL_ZERO for production obviously).

71396cfac97d02 Ilkka Koskinen 2025-08-28  419  				return -ENOSPC;
71396cfac97d02 Ilkka Koskinen 2025-08-28  420  
71396cfac97d02 Ilkka Koskinen 2025-08-28  421  			time_event = true;
71396cfac97d02 Ilkka Koskinen 2025-08-28  422  			continue;
71396cfac97d02 Ilkka Koskinen 2025-08-28  423  		}
71396cfac97d02 Ilkka Koskinen 2025-08-28  424  
71396cfac97d02 Ilkka Koskinen 2025-08-28  425  		if (dwc_pcie_pmu_validate_add_lane_event(sibling, val_lane_events))
71396cfac97d02 Ilkka Koskinen 2025-08-28  426  			return -ENOSPC;
71396cfac97d02 Ilkka Koskinen 2025-08-28  427  	}
71396cfac97d02 Ilkka Koskinen 2025-08-28  428  
71396cfac97d02 Ilkka Koskinen 2025-08-28  429  	return 0;
71396cfac97d02 Ilkka Koskinen 2025-08-28  430  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-09-23 21:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23  5:32 [arm64:for-next/perf 5/28] drivers/perf/dwc_pcie_pmu.c:418 dwc_pcie_pmu_validate_group() error: uninitialized symbol 'time_event' Dan Carpenter
2025-09-23  7:55 ` Ilkka Koskinen
2025-09-23  8:27   ` Dan Carpenter
2025-09-23  8:35     ` Will Deacon
2025-09-23  9:07       ` Will Deacon
2025-09-23 21:16         ` Ilkka Koskinen
2025-09-23  8:29   ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox