mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/powerpc/perf/core-fsl-emb.c:648:13: warning: variable 'found' set but not used
@ 2023-08-21 22:52 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-21 22:52 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: oe-kbuild-all, linux-kernel, Michael Ellerman

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f7757129e3dea336c407551c98f50057c22bb266
commit: 0069f3d14e7a656ba9d7dbaac72659687fdbf43c powerpc/64e: Tie PPC_BOOK3E_64 to PPC_E500MC
date:   11 months ago
config: powerpc64-randconfig-r031-20230822 (https://download.01.org/0day-ci/archive/20230822/202308220658.OR5hHFcD-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230822/202308220658.OR5hHFcD-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308220658.OR5hHFcD-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/powerpc/perf/core-fsl-emb.c: In function 'perf_event_interrupt':
>> arch/powerpc/perf/core-fsl-emb.c:648:13: warning: variable 'found' set but not used [-Wunused-but-set-variable]
     648 |         int found = 0;
         |             ^~~~~
   arch/powerpc/perf/core-fsl-emb.c: At top level:
>> arch/powerpc/perf/core-fsl-emb.c:675:6: warning: no previous prototype for 'hw_perf_event_setup' [-Wmissing-prototypes]
     675 | void hw_perf_event_setup(int cpu)
         |      ^~~~~~~~~~~~~~~~~~~


vim +/found +648 arch/powerpc/perf/core-fsl-emb.c

a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  641  
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  642  static void perf_event_interrupt(struct pt_regs *regs)
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  643  {
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  644  	int i;
69111bac42f5ce arch/powerpc/perf/core-fsl-emb.c         Christoph Lameter 2014-10-21  645  	struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events);
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  646  	struct perf_event *event;
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  647  	unsigned long val;
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25 @648  	int found = 0;
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  649  
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  650  	for (i = 0; i < ppmu->n_counter; ++i) {
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  651  		event = cpuhw->event[i];
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  652  
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  653  		val = read_pmc(i);
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  654  		if ((int)val < 0) {
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  655  			if (event) {
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  656  				/* event has overflowed */
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  657  				found = 1;
a8b0ca17b80e92 arch/powerpc/kernel/perf_event_fsl_emb.c Peter Zijlstra    2011-06-27  658  				record_and_restart(event, val, regs);
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  659  			} else {
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  660  				/*
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  661  				 * Disabled counter is negative,
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  662  				 * reset it just in case.
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  663  				 */
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  664  				write_pmc(i, 0);
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  665  			}
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  666  		}
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  667  	}
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  668  
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  669  	/* PMM will keep counters frozen until we return from the interrupt. */
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  670  	mtmsr(mfmsr() | MSR_PMM);
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  671  	mtpmr(PMRN_PMGC0, PMGC0_PMIE | PMGC0_FCECE);
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  672  	isync();
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  673  }
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  674  
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25 @675  void hw_perf_event_setup(int cpu)
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  676  {
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  677  	struct cpu_hw_events *cpuhw = &per_cpu(cpu_hw_events, cpu);
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  678  
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  679  	memset(cpuhw, 0, sizeof(*cpuhw));
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  680  }
a11106544f33c1 arch/powerpc/kernel/perf_event_fsl_emb.c Scott Wood        2010-02-25  681  

:::::: The code at line 648 was first introduced by commit
:::::: a11106544f33c104706ae42d27219a409b67478e powerpc/perf: e500 support

:::::: TO: Scott Wood <scottwood@freescale.com>
:::::: CC: Kumar Gala <galak@kernel.crashing.org>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-21 22:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-21 22:52 arch/powerpc/perf/core-fsl-emb.c:648:13: warning: variable 'found' set but not used kernel test robot

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

Powered by JetHome