From nobody Mon Nov 25 11:29:47 2024 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 347551922F9 for ; Mon, 28 Oct 2024 07:32:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100743; cv=none; b=NOYfLaqgzfFUrCYfFlyuRZ2Z9Qaxgt3uEmz+49grCdzFFgLUePQbZkb2uSHBwgDhHaAFBzpcfxfMTyClmVOwL8p1sCeZVDAJRue/KqwhyF76fWV/Mq8R64jKwNNRLVlLJseNA8l95MUlb+SsahE2y+3e0tBlaUciXt8ottybYww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100743; c=relaxed/simple; bh=CqHN/CevzE2KWFjgA9NTQe5jdoRTX+hW3VuxFLg85S0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dH/2fh0a9Luqea5yOTzeUJDkZF1QaJ+4uW3CcYUj2xI2wXzguljVydjCn7koBiM37yO2YW73OmTku2OJjyBvq/m/ANeB8L+QpJ6Pr7qzBqGOlpk8FLFMI6N4Fnldv3FbNyjUKb2Bcxl8Yb04Lf2mGMPKPprPs5ewc0AC+s63lE4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=julUtZR+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Brgh6lIr; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="julUtZR+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Brgh6lIr" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=guF/UA1hI0xHq7jYGgwI8l3WfvemyIeIMX1G1unXY0c=; b=julUtZR+gSME1hVuTKca3rZxMOkEvSY79YvA9ipymWVPxFoZbpi0O990iZcTz8a/p+cD/O 7H+hZz2geb//twUWEfuKEcWxeI+Qw6P7+M2wlNTxLqJv1qBChfOEGC61ZvjliKdMNqCkSG ZehBCO+am5j5M8gFNPAO4/utONaBGoz/lJnNLnSlRBWLgWQdKwH6/wvwA003rhCmgqhcl+ iYxvERiPkzg3+fGSPijOicV47RErgLHZaykJlemR5IZESagTDNzMoaAebz9aSbzOB6MPuk pAcw8unKmGXbKPrC0FT44wM3oQdlm5stj5lxdwU4CV8kt8msbyyTisQJk8kPsQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=guF/UA1hI0xHq7jYGgwI8l3WfvemyIeIMX1G1unXY0c=; b=Brgh6lIrKuJFwFSWD1mdlPUr/I1I5ow7+C9iRyIs4Q2c0ubRHMs/isb6XnO1Vcou9Xjb4G 8TYHTYfYp/k4ShAw== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Huacai Chen Subject: [PATCH 06/31] LoongArch: KVM: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:31:39 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao --- Cc: Huacai Chen --- arch/loongarch/kvm/vcpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/loongarch/kvm/vcpu.c b/arch/loongarch/kvm/vcpu.c index 0697b1064251..eada16d2532c 100644 --- a/arch/loongarch/kvm/vcpu.c +++ b/arch/loongarch/kvm/vcpu.c @@ -1457,8 +1457,8 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) vcpu->arch.vpid =3D 0; vcpu->arch.flush_gpa =3D INVALID_GPA; =20 - hrtimer_init(&vcpu->arch.swtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNE= D); - vcpu->arch.swtimer.function =3D kvm_swtimer_wakeup; + hrtimer_setup(&vcpu->arch.swtimer, kvm_swtimer_wakeup, CLOCK_MONOTONIC, + HRTIMER_MODE_ABS_PINNED); =20 vcpu->arch.handle_exit =3D kvm_handle_exit; vcpu->arch.guest_eentry =3D (unsigned long)kvm_loongarch_ops->exc_entry; --=20 2.39.5