]> Git Repo - linux.git/commitdiff
KVM: MIPS: Make kvm_mips_callbacks const
authorSean Christopherson <[email protected]>
Fri, 24 Feb 2023 19:28:32 +0000 (11:28 -0800)
committerSean Christopherson <[email protected]>
Thu, 23 Mar 2023 23:11:36 +0000 (16:11 -0700)
Make kvm_mips_callbacks fully const as it's now hardcoded to point at
kvm_vz_callbacks, the only remaining the set of callbacks.

Link: https://lore.kernel.org/all/[email protected]
Suggested-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
arch/mips/include/asm/kvm_host.h
arch/mips/kvm/vz.c

index 2803c9c21ef9b6031734e118b6818c5765e07ecf..957121a495f0b744d3881f9d59627a89e269bb6c 100644 (file)
@@ -757,7 +757,7 @@ struct kvm_mips_callbacks {
        int (*vcpu_run)(struct kvm_vcpu *vcpu);
        void (*vcpu_reenter)(struct kvm_vcpu *vcpu);
 };
-extern struct kvm_mips_callbacks *kvm_mips_callbacks;
+extern const struct kvm_mips_callbacks * const kvm_mips_callbacks;
 int kvm_mips_emulation_init(void);
 
 /* Debug: dump vcpu state */
index dafab003ea0df283cb862767770f2d3fac098880..3d21cbfa74435fe7739eeaea457810b129337d43 100644 (file)
@@ -3305,7 +3305,7 @@ static struct kvm_mips_callbacks kvm_vz_callbacks = {
 };
 
 /* FIXME: Get rid of the callbacks now that trap-and-emulate is gone. */
-struct kvm_mips_callbacks *kvm_mips_callbacks = &kvm_vz_callbacks;
+const struct kvm_mips_callbacks * const kvm_mips_callbacks = &kvm_vz_callbacks;
 
 int kvm_mips_emulation_init(void)
 {
This page took 0.062247 seconds and 4 git commands to generate.