Commit 3b22dae3 authored by Julia Lawall's avatar Julia Lawall Committed by David S. Miller

VSOCK: constify vmci_transport_notify_ops structures

The vmci_transport_notify_ops structures are never modified, so declare
them as const.

Done with the help of Coccinelle.
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4dd191bb
...@@ -121,7 +121,7 @@ struct vmci_transport { ...@@ -121,7 +121,7 @@ struct vmci_transport {
u64 queue_pair_max_size; u64 queue_pair_max_size;
u32 detach_sub_id; u32 detach_sub_id;
union vmci_transport_notify notify; union vmci_transport_notify notify;
struct vmci_transport_notify_ops *notify_ops; const struct vmci_transport_notify_ops *notify_ops;
struct list_head elem; struct list_head elem;
struct sock *sk; struct sock *sk;
spinlock_t lock; /* protects sk. */ spinlock_t lock; /* protects sk. */
......
...@@ -661,7 +661,7 @@ static void vmci_transport_notify_pkt_process_negotiate(struct sock *sk) ...@@ -661,7 +661,7 @@ static void vmci_transport_notify_pkt_process_negotiate(struct sock *sk)
} }
/* Socket control packet based operations. */ /* Socket control packet based operations. */
struct vmci_transport_notify_ops vmci_transport_notify_pkt_ops = { const struct vmci_transport_notify_ops vmci_transport_notify_pkt_ops = {
vmci_transport_notify_pkt_socket_init, vmci_transport_notify_pkt_socket_init,
vmci_transport_notify_pkt_socket_destruct, vmci_transport_notify_pkt_socket_destruct,
vmci_transport_notify_pkt_poll_in, vmci_transport_notify_pkt_poll_in,
......
...@@ -77,7 +77,8 @@ struct vmci_transport_notify_ops { ...@@ -77,7 +77,8 @@ struct vmci_transport_notify_ops {
void (*process_negotiate) (struct sock *sk); void (*process_negotiate) (struct sock *sk);
}; };
extern struct vmci_transport_notify_ops vmci_transport_notify_pkt_ops; extern const struct vmci_transport_notify_ops vmci_transport_notify_pkt_ops;
extern struct vmci_transport_notify_ops vmci_transport_notify_pkt_q_state_ops; extern const
struct vmci_transport_notify_ops vmci_transport_notify_pkt_q_state_ops;
#endif /* __VMCI_TRANSPORT_NOTIFY_H__ */ #endif /* __VMCI_TRANSPORT_NOTIFY_H__ */
...@@ -419,7 +419,7 @@ vmci_transport_notify_pkt_send_pre_enqueue( ...@@ -419,7 +419,7 @@ vmci_transport_notify_pkt_send_pre_enqueue(
} }
/* Socket always on control packet based operations. */ /* Socket always on control packet based operations. */
struct vmci_transport_notify_ops vmci_transport_notify_pkt_q_state_ops = { const struct vmci_transport_notify_ops vmci_transport_notify_pkt_q_state_ops = {
vmci_transport_notify_pkt_socket_init, vmci_transport_notify_pkt_socket_init,
vmci_transport_notify_pkt_socket_destruct, vmci_transport_notify_pkt_socket_destruct,
vmci_transport_notify_pkt_poll_in, vmci_transport_notify_pkt_poll_in,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment