Skip to content

Commit 173e783

Browse files
linzhangdavem330
authored andcommitted
net: socket: mark socket protocol handler structs as const
Signed-off-by: linzhang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9aef88e commit 173e783

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

net/bluetooth/af_bluetooth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ void bt_procfs_cleanup(struct net *net, const char *name)
733733
EXPORT_SYMBOL(bt_procfs_init);
734734
EXPORT_SYMBOL(bt_procfs_cleanup);
735735

736-
static struct net_proto_family bt_sock_family_ops = {
736+
static const struct net_proto_family bt_sock_family_ops = {
737737
.owner = THIS_MODULE,
738738
.family = PF_BLUETOOTH,
739739
.create = bt_sock_create,

net/caif/caif_socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ static int caif_create(struct net *net, struct socket *sock, int protocol,
10991099
}
11001100

11011101

1102-
static struct net_proto_family caif_family_ops = {
1102+
static const struct net_proto_family caif_family_ops = {
11031103
.family = PF_CAIF,
11041104
.create = caif_create,
11051105
.owner = THIS_MODULE,

net/kcm/kcmsock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ static int kcm_create(struct net *net, struct socket *sock,
19851985
return 0;
19861986
}
19871987

1988-
static struct net_proto_family kcm_family_ops = {
1988+
static const struct net_proto_family kcm_family_ops = {
19891989
.family = PF_KCM,
19901990
.create = kcm_create,
19911991
.owner = THIS_MODULE,

net/nfc/af_nfc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static int nfc_sock_create(struct net *net, struct socket *sock, int proto,
4848
return rc;
4949
}
5050

51-
static struct net_proto_family nfc_sock_family_ops = {
51+
static const struct net_proto_family nfc_sock_family_ops = {
5252
.owner = THIS_MODULE,
5353
.family = PF_NFC,
5454
.create = nfc_sock_create,

0 commit comments

Comments
 (0)