mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip: timers/cleanups] KVM: PPC: Switch to use hrtimer_setup()
@ 2025-02-18  9:46 tip-bot2 for Nam Cao
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Nam Cao @ 2025-02-18  9:46 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Nam Cao, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the timers/cleanups branch of tip:

Commit-ID:     a0241210a3f3950bf4a28b5077108c8a126d47ec
Gitweb:        https://git.kernel.org/tip/a0241210a3f3950bf4a28b5077108c8a126d47ec
Author:        Nam Cao <namcao@linutronix.de>
AuthorDate:    Wed, 05 Feb 2025 11:38:46 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 18 Feb 2025 10:32:30 +01:00

KVM: PPC: Switch to use hrtimer_setup()

hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely.

Replace hrtimer_init() and the open coded initialization of
hrtimer::function with the new setup mechanism.

Patch was created by using Coccinelle.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/a58c4f16b1cfba13f96201fda355553850a97562.1738746821.git.namcao@linutronix.de

---
 arch/powerpc/kvm/powerpc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index ce1d91e..61f2b7e 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -766,8 +766,8 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
 {
 	int err;
 
-	hrtimer_init(&vcpu->arch.dec_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
-	vcpu->arch.dec_timer.function = kvmppc_decrementer_wakeup;
+	hrtimer_setup(&vcpu->arch.dec_timer, kvmppc_decrementer_wakeup, CLOCK_REALTIME,
+		      HRTIMER_MODE_ABS);
 
 #ifdef CONFIG_KVM_EXIT_TIMING
 	mutex_init(&vcpu->arch.exit_timing_lock);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-18  9:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-18  9:46 [tip: timers/cleanups] KVM: PPC: Switch to use hrtimer_setup() tip-bot2 for Nam Cao

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®