[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/4] target/arm: Remove timer_del()/timer_deinit() before time
From: |
Peter Maydell |
Subject: |
[PATCH v2 4/4] target/arm: Remove timer_del()/timer_deinit() before timer_free() |
Date: |
Tue, 15 Dec 2020 15:41:07 +0000 |
The Arm CPU finalize function uses a sequence of timer_del(), timer_deinit(),
timer_free() to free the timer. The timer_deinit() step in this was always
unnecessary, and now the timer_del() is implied by timer_free(), so we can
collapse this down to simply calling timer_free().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/cpu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index d6188f6566a..b4795a2bf44 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1304,8 +1304,6 @@ static void arm_cpu_finalizefn(Object *obj)
}
#ifndef CONFIG_USER_ONLY
if (cpu->pmu_timer) {
- timer_del(cpu->pmu_timer);
- timer_deinit(cpu->pmu_timer);
timer_free(cpu->pmu_timer);
}
#endif
--
2.20.1