From: Drew Fustini Date: Tue, 23 Nov 2021 19:25:24 +0000 (-0800) Subject: clocksource/drivers/pistachio: Fix -Wunused-but-set-variable warning X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0642fb4ba68f7158f7a6d92190b3090cf0c7fac6;p=linux.git 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 Suggested-by: Daniel Lezcano Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20211123192524.1038304-1-dfustini@baylibre.com Signed-off-by: Daniel Lezcano --- diff --git a/drivers/clocksource/timer-pistachio.c b/drivers/clocksource/timer-pistachio.c index 6f37181a8c633..69c069e6f0a21 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; /*