Skip to content

Commit 0642fb4

Browse files
pdp7dlezcano
authored andcommitted
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>
1 parent 0ed9e4e commit 0642fb4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/clocksource/timer-pistachio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ static u64 notrace
7171
pistachio_clocksource_read_cycles(struct clocksource *cs)
7272
{
7373
struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs);
74-
u32 counter, overflow;
74+
__maybe_unused u32 overflow;
75+
u32 counter;
7576
unsigned long flags;
7677

7778
/*

0 commit comments

Comments
 (0)