[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <164181959340.16921.12441384820128333820.tip-bot2@tip-bot2>
Date: Mon, 10 Jan 2022 12:59:53 -0000
From: "tip-bot2 for Drew Fustini" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: kernel test robot <lkp@...el.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Drew Fustini <dfustini@...libre.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: timers/core] clocksource/drivers/pistachio: Fix
-Wunused-but-set-variable warning
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 <dfustini@...libre.com>
AuthorDate: Tue, 23 Nov 2021 11:25:24 -08:00
Committer: Daniel Lezcano <daniel.lezcano@...aro.org>
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.
Link: https://lore.kernel.org/lkml/202111200402.afQsussU-lkp@intel.com/
Reported-by: kernel test robot <lkp@...el.com>
Suggested-by: Daniel Lezcano <daniel.lezcano@...aro.org>
Signed-off-by: Drew Fustini <dfustini@...libre.com>
Link: https://lore.kernel.org/r/20211123192524.1038304-1-dfustini@baylibre.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
---
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 6f37181..69c069e 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;
/*
Powered by blists - more mailing lists