[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109280159.EJ1fi67Z-lkp@intel.com>
Date: Tue, 28 Sep 2021 01:02:05 +0800
From: kernel test robot <lkp@...el.com>
To: Drew Fustini <drew@...gleboard.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Daniel Lezcano <daniel.lezcano@...aro.org>
Subject: drivers/clocksource/timer-pistachio.c:74:22: warning: variable
'overflow' set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: a47d7ef4550d08fb428ea4c3f1a9c71674212208 clocksource/drivers/pistachio: Fix trivial typo
date: 6 months ago
config: mips-randconfig-r012-20210927 (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a47d7ef4550d08fb428ea4c3f1a9c71674212208
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a47d7ef4550d08fb428ea4c3f1a9c71674212208
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/clocksource/timer-pistachio.c: In function 'pistachio_clocksource_read_cycles':
>> drivers/clocksource/timer-pistachio.c:74:22: warning: variable 'overflow' set but not used [-Wunused-but-set-variable]
74 | u32 counter, overflow;
| ^~~~~~~~
vim +/overflow +74 drivers/clocksource/timer-pistachio.c
69
70 static u64 notrace
71 pistachio_clocksource_read_cycles(struct clocksource *cs)
72 {
73 struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs);
> 74 u32 counter, overflow;
75 unsigned long flags;
76
77 /*
78 * The counter value is only refreshed after the overflow value is read.
79 * And they must be read in strict order, hence raw spin lock added.
80 */
81
82 raw_spin_lock_irqsave(&pcs->lock, flags);
83 overflow = gpt_readl(pcs->base, TIMER_CURRENT_OVERFLOW_VALUE, 0);
84 counter = gpt_readl(pcs->base, TIMER_CURRENT_VALUE, 0);
85 raw_spin_unlock_irqrestore(&pcs->lock, flags);
86
87 return (u64)~counter;
88 }
89
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (28875 bytes)
Powered by blists - more mailing lists