[PATCH net-next RFC 4/5] vsock/vmci: constify vmci_transport
From: Michal Luczaj
Date: Thu Dec 03 2026 - 11:34:08 EST
Struct is never modified. Add `const` qualifier, let it be moved to
read-only section.
No functional change intended, compile tested only.
Signed-off-by: Michal Luczaj <mhal@xxxxxxx>
---
net/vmw_vsock/vmci_transport.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 282131544c42..2d03b5886311 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -75,7 +75,7 @@ static u32 vmci_transport_qp_resumed_sub_id = VMCI_INVALID_ID;
static int PROTOCOL_OVERRIDE = -1;
-static struct vsock_transport vmci_transport; /* forward declaration */
+static const struct vsock_transport vmci_transport; /* forward declaration */
/* Helper function to convert from a VMCI error code to a VSock error code. */
@@ -2073,7 +2073,7 @@ static u32 vmci_transport_get_local_cid(void)
return vmci_get_context_id();
}
-static struct vsock_transport vmci_transport = {
+static const struct vsock_transport vmci_transport = {
.module = THIS_MODULE,
.init = vmci_transport_socket_init,
.destruct = vmci_transport_destruct,
--
2.56.1