* [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
* Re: [PATCH] clocksource/drivers/pistachio: Fix -Wunused-but-set-variable warning
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
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2021-12-09 13:16 UTC (permalink / raw)
To: Drew Fustini, Thomas Gleixner, linux-kernel; +Cc: kernel test robot
On 23/11/2021 20:25, Drew Fustini wrote:
> 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>
> ---
Applied, thanks
-- Daniel
--
<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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: timers/core] clocksource/drivers/pistachio: Fix -Wunused-but-set-variable warning
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-bot2 for Drew Fustini
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Drew Fustini @ 2022-01-10 12:59 UTC (permalink / raw)
To: linux-tip-commits
Cc: kernel test robot, Daniel Lezcano, Drew Fustini, x86, linux-kernel
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@baylibre.com>
AuthorDate: Tue, 23 Nov 2021 11:25:24 -08:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.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@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>
---
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;
/*
^ 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®