mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/pistachio: Fix -Wunused-but-set-variable warning
@ 2021-11-23 19:25 Drew Fustini
  2021-12-09 13:16 ` Daniel Lezcano
  2022-01-10 12:59 ` [tip: timers/core] " tip-bot2 for Drew Fustini
  0 siblings, 2 replies; 3+ messages in thread
From: Drew Fustini @ 2021-11-23 19:25 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, linux-kernel
  Cc: Drew Fustini, kernel test robot

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>
---
 drivers/clocksource/timer-pistachio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
 
 	/*
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-10 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 19:25 [PATCH] clocksource/drivers/pistachio: Fix -Wunused-but-set-variable warning Drew Fustini
2021-12-09 13:16 ` Daniel Lezcano
2022-01-10 12:59 ` [tip: timers/core] " tip-bot2 for Drew Fustini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®