clocksource/drivers/pistachio: Fix -Wunused-but-set-variable warning
PATCH 1/1 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.
--- drivers/clocksource/timer-pistachio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/timer-pistachio.c +2 -1
@@ -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;/*
Signature · 1 line
2.27.0
Daniel Lezcano
AppliedQuoted 9 lines · Drew Fustini
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.
Reported-by kernel test robot <[email protected]>Suggested-by Daniel Lezcano <[email protected]>Signed-off-by Drew Fustini <[email protected]>---
Applied, thanks
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 0642fb4ba68f7158f7a6d92190b3090cf0c7fac6 Gitweb: https://git.kernel.org/tip/0642fb4ba68f7158f7a6d92190b3090cf0c7fac6 Author: Drew Fustini <[email protected]> AuthorDate: Tue, 23 Nov 2021 11:25:24 -08:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Tue, 14 Dec 2021 10:17:36 +01:00
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.
--- drivers/clocksource/timer-pistachio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/timer-pistachio.c +2 -1
@@ -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;/*