Skip to contentSkip to conversation

net: socket: mark socket protocol handler structs as const

PATCH Applied linzhang 2 participants 2 messages May 15, 2017 – May 16, 2017

Subsystems (5)
lore
Share & tools
lore

linzhang

author
#0 lore raw

PATCH 1/1 net: socket: mark socket protocol handler structs as const

---
 net/bluetooth/af_bluetooth.c | 2 +-
 net/caif/caif_socket.c       | 2 +-
 net/kcm/kcmsock.c            | 2 +-
 net/nfc/af_nfc.c             | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
net/bluetooth/af_bluetooth.c +1 -1
index 42d0997..8a8f77a 100644
@@ -733,7 +733,7 @@ void bt_procfs_cleanup(struct net *net, const char *name)
 EXPORT_SYMBOL(bt_procfs_init);
 EXPORT_SYMBOL(bt_procfs_cleanup);
 
-static struct net_proto_family bt_sock_family_ops = {
+static const struct net_proto_family bt_sock_family_ops = {
 	.owner	= THIS_MODULE,
 	.family	= PF_BLUETOOTH,
 	.create	= bt_sock_create,
net/caif/caif_socket.c +1 -1
index adcad34..4674d17 100644
@@ -1099,7 +1099,7 @@ static int caif_create(struct net *net, struct socket *sock, int protocol,
 }
 
 
-static struct net_proto_family caif_family_ops = {
+static const struct net_proto_family caif_family_ops = {
 	.family = PF_CAIF,
 	.create = caif_create,
 	.owner = THIS_MODULE,
net/kcm/kcmsock.c +1 -1
index deca20f..da49191 100644
@@ -1985,7 +1985,7 @@ static int kcm_create(struct net *net, struct socket *sock,
 	return 0;
 }
 
-static struct net_proto_family kcm_family_ops = {
+static const struct net_proto_family kcm_family_ops = {
 	.family = PF_KCM,
 	.create = kcm_create,
 	.owner  = THIS_MODULE,
net/nfc/af_nfc.c +1 -1
index 54e40fa..d3e594e 100644
@@ -48,7 +48,7 @@ static int nfc_sock_create(struct net *net, struct socket *sock, int proto,
 	return rc;
 }
 
-static struct net_proto_family nfc_sock_family_ops = {
+static const struct net_proto_family nfc_sock_family_ops = {
 	.owner  = THIS_MODULE,
 	.family = PF_NFC,
 	.create = nfc_sock_create,
Signature · 1 line
1.8.3.1