summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/vgic/vgic-mmio.c
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-12-04 22:35:18 +0100
committerMarc Zyngier <maz@kernel.org>2021-12-06 09:34:06 +0100
commit636dcd0204599f94680f8f87b46cef7c66034ac0 (patch)
tree47f3bb187c6a9fe172003c9b361fd1282ffbfd96 /arch/arm64/kvm/vgic/vgic-mmio.c
parentKVM: arm64: Add minimal handling for the ARMv8.7 PMU (diff)
downloadlinux-636dcd0204599f94680f8f87b46cef7c66034ac0.tar.xz
linux-636dcd0204599f94680f8f87b46cef7c66034ac0.zip
KVM: arm64: Constify kvm_io_gic_ops
The only usage of kvm_io_gic_ops is to make a comparison with its address and to pass its address to kvm_iodevice_init() which takes a pointer to const kvm_io_device_ops as input. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20211204213518.83642-1-rikard.falkeborn@gmail.com
Diffstat (limited to 'arch/arm64/kvm/vgic/vgic-mmio.c')
-rw-r--r--arch/arm64/kvm/vgic/vgic-mmio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/vgic/vgic-mmio.c b/arch/arm64/kvm/vgic/vgic-mmio.c
index 48c6067fc5ec..7068da080799 100644
--- a/arch/arm64/kvm/vgic/vgic-mmio.c
+++ b/arch/arm64/kvm/vgic/vgic-mmio.c
@@ -1050,7 +1050,7 @@ static int dispatch_mmio_write(struct kvm_vcpu *vcpu, struct kvm_io_device *dev,
return 0;
}
-struct kvm_io_device_ops kvm_io_gic_ops = {
+const struct kvm_io_device_ops kvm_io_gic_ops = {
.read = dispatch_mmio_read,
.write = dispatch_mmio_write,
};