From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>
Subject: [PATCH v2 4/4] target/arm: Remove timer_del()/timer_deinit() before timer_free()
Date: Tue, 15 Dec 2020 15:41:07 +0000 [thread overview]
Message-ID: <20201215154107.3255-5-peter.maydell@linaro.org> (raw)
In-Reply-To: <20201215154107.3255-1-peter.maydell@linaro.org>
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
next prev parent reply other threads:[~2020-12-15 15:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 15:41 [PATCH v2 0/4] qemu-timer: Make timer_free() imply timer_del() Peter Maydell
2020-12-15 15:41 ` [PATCH v2 1/4] util/qemu-timer: " Peter Maydell
2020-12-15 15:54 ` Richard Henderson
2020-12-15 15:41 ` [PATCH v2 2/4] scripts/coccinelle: New script to remove unnecessary timer_del() calls Peter Maydell
2020-12-15 15:55 ` Richard Henderson
2020-12-15 15:41 ` [PATCH v2 3/4] Remove superfluous " Peter Maydell
2020-12-15 15:41 ` Peter Maydell [this message]
2020-12-15 15:54 ` [PATCH v2 4/4] target/arm: Remove timer_del()/timer_deinit() before timer_free() Richard Henderson
2021-01-05 10:54 ` [PATCH v2 0/4] qemu-timer: Make timer_free() imply timer_del() Philippe Mathieu-Daudé
2021-01-07 21:18 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201215154107.3255-5-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).