oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: arch/powerpc/perf/core-fsl-emb.c:648:13: warning: variable 'found' set but not used
Date: Tue, 22 Aug 2023 06:52:43 +0800	[thread overview]
Message-ID: <202308220658.OR5hHFcD-lkp@intel.com> (raw)

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

                 reply	other threads:[~2023-08-21 22:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202308220658.OR5hHFcD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).