summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorDrew Fustini <dfustini@baylibre.com>2021-11-23 20:25:24 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2021-12-14 10:17:36 +0100
commit0642fb4ba68f7158f7a6d92190b3090cf0c7fac6 (patch)
tree9cb92869e81541c47821cb1461f264120920112e /drivers/clocksource
parentclocksource/drivers/timer-imx-sysctr: Set cpumask to cpu_possible_mask (diff)
downloadlinux-0642fb4ba68f7158f7a6d92190b3090cf0c7fac6.tar.xz
linux-0642fb4ba68f7158f7a6d92190b3090cf0c7fac6.zip
clocksource/drivers/pistachio: Fix -Wunused-but-set-variable warning
Variable 'overflow' set but not used, but this is the intended behavior. The hardware only updates the counter register after the overflow register read. However, the value of overflow is not actually needed. Link: https://lore.kernel.org/lkml/202111200402.afQsussU-lkp@intel.com/ Reported-by: kernel test robot <lkp@intel.com> Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Drew Fustini <dfustini@baylibre.com> Link: https://lore.kernel.org/r/20211123192524.1038304-1-dfustini@baylibre.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/timer-pistachio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clocksource/timer-pistachio.c b/drivers/clocksource/timer-pistachio.c
index 6f37181a8c63..69c069e6f0a2 100644
--- a/drivers/clocksource/timer-pistachio.c
+++ b/drivers/clocksource/timer-pistachio.c
@@ -71,7 +71,8 @@ static u64 notrace
pistachio_clocksource_read_cycles(struct clocksource *cs)
{
struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs);
- u32 counter, overflow;
+ __maybe_unused u32 overflow;
+ u32 counter;
unsigned long flags;
/*