Skip to content

Commit

Permalink
clocksource/drivers/pistachio: Fix -Wunused-but-set-variable warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pdp7 authored and dlezcano committed Dec 14, 2021
1 parent 0ed9e4e commit 0642fb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/clocksource/timer-pistachio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 0642fb4

Please sign in to comment.