[PATCH] VSOCK: constify vsock_transport structure

Subsystems: networking [general], the rest, vm sockets (af_vsock), vmware vsock vmci transport driver

STALE3757d

2 messages, 2 authors, 2016-05-03 · open the first message on its own page

[PATCH] VSOCK: constify vsock_transport structure

From: Julia Lawall <hidden>
Date: 2016-05-01 13:04:37

The vsock_transport structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <redacted>

---
 net/vmw_vsock/vmci_transport.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 5621473..4120b7a 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -2051,7 +2051,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 = {
 	.init = vmci_transport_socket_init,
 	.destruct = vmci_transport_destruct,
 	.release = vmci_transport_release,

Re: [PATCH] VSOCK: constify vsock_transport structure

From: David Miller <davem@davemloft.net>
Date: 2016-05-03 17:03:28

From: Julia Lawall <redacted>
Date: Sun,  1 May 2016 14:49:15 +0200
The vsock_transport structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help