Skip to contentSkip to conversation

KVM: x86: Update the variable naming in kvm_x86_ops.sched_in()

PATCH Applied Mingwei Zhang 2 participants 2 messages Oct 17, 2023 – Oct 18, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: x86: Update the variable naming in kvm_x86_ops.sched_in()

Update the variable with name 'kvm' in kvm_x86_ops.sched_in() to 'vcpu' to avoid confusions. Variable naming in KVM has a clear convention that 'kvm' refers to pointer of type 'struct kvm *', while 'vcpu' refers to pointer of type 'struct kvm_vcpu *'.

Fix this 9-year old naming issue for fun.

---
 arch/x86/include/asm/kvm_host.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/kvm_host.h +1 -1
index 7c228ae05df0..394e1a31c02c 100644
@@ -1703,7 +1703,7 @@ struct kvm_x86_ops {
 
 	void (*request_immediate_exit)(struct kvm_vcpu *vcpu);
 
-	void (*sched_in)(struct kvm_vcpu *kvm, int cpu);
+	void (*sched_in)(struct kvm_vcpu *vcpu, int cpu);
 
 	/*
 	 * Size of the CPU's dirty log buffer, i.e. VMX's PML buffer.  A zero

base-commit: 437bba5ad2bba00c2056c896753a32edf80860cc

Signature · 1 line
2.42.0.655.g421f12c284-goog
maintainer Applied
#1 lore raw
Quoted 8 lines · Mingwei Zhang

Update the variable with name 'kvm' in kvm_x86_ops.sched_in() to 'vcpu' to avoid confusions. Variable naming in KVM has a clear convention that 'kvm' refers to pointer of type 'struct kvm *', while 'vcpu' refers to pointer of type 'struct kvm_vcpu *'.

Fix this 9-year old naming issue for fun.

[...]

Applied to kvm-x86 misc, thanks!

[1/1] KVM: x86: Update the variable naming in kvm_x86_ops.sched_in()

      https://github.com/kvm-x86/linux/commit/5a989bbead4c

--
https://github.com/kvm-x86/linux/tree/next