From: "irqchip-bot for Rikard Falkeborn" <tip-bot2@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Marc Zyngier <maz@kernel.org>,
tglx@linutronix.de
Subject: [irqchip: irq/irqchip-next] KVM: arm64: Constify kvm_io_gic_ops
Date: Mon, 20 Dec 2021 14:00:48 -0000 [thread overview]
Message-ID: <164000884802.23020.11471347198452228590.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20211204213518.83642-1-rikard.falkeborn@gmail.com>
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: 636dcd0204599f94680f8f87b46cef7c66034ac0
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/636dcd0204599f94680f8f87b46cef7c66034ac0
Author: Rikard Falkeborn <rikard.falkeborn@gmail.com>
AuthorDate: Sat, 04 Dec 2021 22:35:18 +01:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Mon, 06 Dec 2021 08:34:06
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
---
arch/arm64/kvm/vgic/vgic-mmio.c | 2 +-
arch/arm64/kvm/vgic/vgic-mmio.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kvm/vgic/vgic-mmio.c b/arch/arm64/kvm/vgic/vgic-mmio.c
index 48c6067..7068da0 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,
};
diff --git a/arch/arm64/kvm/vgic/vgic-mmio.h b/arch/arm64/kvm/vgic/vgic-mmio.h
index fefcca2..3fa696f 100644
--- a/arch/arm64/kvm/vgic/vgic-mmio.h
+++ b/arch/arm64/kvm/vgic/vgic-mmio.h
@@ -34,7 +34,7 @@ struct vgic_register_region {
};
};
-extern struct kvm_io_device_ops kvm_io_gic_ops;
+extern const struct kvm_io_device_ops kvm_io_gic_ops;
#define VGIC_ACCESS_8bit 1
#define VGIC_ACCESS_32bit 2
prev parent reply other threads:[~2021-12-20 14:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-04 21:35 [PATCH] KVM: arm64: Constify kvm_io_gic_ops Rikard Falkeborn
2021-12-06 8:41 ` Marc Zyngier
2021-12-20 14:00 ` irqchip-bot for Rikard Falkeborn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=164000884802.23020.11471347198452228590.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=rikard.falkeborn@gmail.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).