Commit ec1b4cf74c81bfd0fbe5bf62bafc86c45917e72f
Committed by
David S. Miller
1 parent
f7734fdf61
Exists in
master
and in
39 other branches
net: mark net_proto_ops as const
All usages of structure net_proto_ops should be declared const. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 35 changed files with 36 additions and 37 deletions Side-by-side Diff
- drivers/isdn/mISDN/socket.c
- drivers/net/pppox.c
- include/net/bluetooth/bluetooth.h
- net/appletalk/ddp.c
- net/atm/pvc.c
- net/atm/svc.c
- net/ax25/af_ax25.c
- net/bluetooth/af_bluetooth.c
- net/bluetooth/bnep/sock.c
- net/bluetooth/cmtp/sock.c
- net/bluetooth/hci_sock.c
- net/bluetooth/hidp/sock.c
- net/bluetooth/l2cap.c
- net/bluetooth/rfcomm/sock.c
- net/bluetooth/sco.c
- net/can/af_can.c
- net/decnet/af_decnet.c
- net/econet/af_econet.c
- net/ieee802154/af_ieee802154.c
- net/ipv4/af_inet.c
- net/ipv6/af_inet6.c
- net/ipx/af_ipx.c
- net/irda/af_irda.c
- net/iucv/af_iucv.c
- net/key/af_key.c
- net/llc/af_llc.c
- net/netlink/af_netlink.c
- net/netrom/af_netrom.c
- net/packet/af_packet.c
- net/phonet/af_phonet.c
- net/rds/af_rds.c
- net/rose/af_rose.c
- net/rxrpc/af_rxrpc.c
- net/unix/af_unix.c
- net/x25/af_x25.c
drivers/isdn/mISDN/socket.c
drivers/net/pppox.c
include/net/bluetooth/bluetooth.h
... | ... | @@ -121,7 +121,7 @@ |
121 | 121 | rwlock_t lock; |
122 | 122 | }; |
123 | 123 | |
124 | -int bt_sock_register(int proto, struct net_proto_family *ops); | |
124 | +int bt_sock_register(int proto, const struct net_proto_family *ops); | |
125 | 125 | int bt_sock_unregister(int proto); |
126 | 126 | void bt_sock_link(struct bt_sock_list *l, struct sock *s); |
127 | 127 | void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); |
net/appletalk/ddp.c
net/atm/pvc.c
net/atm/svc.c
net/ax25/af_ax25.c
net/bluetooth/af_bluetooth.c
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | |
46 | 46 | /* Bluetooth sockets */ |
47 | 47 | #define BT_MAX_PROTO 8 |
48 | -static struct net_proto_family *bt_proto[BT_MAX_PROTO]; | |
48 | +static const struct net_proto_family *bt_proto[BT_MAX_PROTO]; | |
49 | 49 | static DEFINE_RWLOCK(bt_proto_lock); |
50 | 50 | |
51 | 51 | static struct lock_class_key bt_lock_key[BT_MAX_PROTO]; |
... | ... | @@ -86,7 +86,7 @@ |
86 | 86 | bt_key_strings[proto], &bt_lock_key[proto]); |
87 | 87 | } |
88 | 88 | |
89 | -int bt_sock_register(int proto, struct net_proto_family *ops) | |
89 | +int bt_sock_register(int proto, const struct net_proto_family *ops) | |
90 | 90 | { |
91 | 91 | int err = 0; |
92 | 92 |
net/bluetooth/bnep/sock.c
net/bluetooth/cmtp/sock.c
net/bluetooth/hci_sock.c
net/bluetooth/hidp/sock.c
net/bluetooth/l2cap.c
... | ... | @@ -3916,7 +3916,7 @@ |
3916 | 3916 | .getsockopt = l2cap_sock_getsockopt |
3917 | 3917 | }; |
3918 | 3918 | |
3919 | -static struct net_proto_family l2cap_sock_family_ops = { | |
3919 | +static const struct net_proto_family l2cap_sock_family_ops = { | |
3920 | 3920 | .family = PF_BLUETOOTH, |
3921 | 3921 | .owner = THIS_MODULE, |
3922 | 3922 | .create = l2cap_sock_create, |
net/bluetooth/rfcomm/sock.c
... | ... | @@ -1101,7 +1101,7 @@ |
1101 | 1101 | .mmap = sock_no_mmap |
1102 | 1102 | }; |
1103 | 1103 | |
1104 | -static struct net_proto_family rfcomm_sock_family_ops = { | |
1104 | +static const struct net_proto_family rfcomm_sock_family_ops = { | |
1105 | 1105 | .family = PF_BLUETOOTH, |
1106 | 1106 | .owner = THIS_MODULE, |
1107 | 1107 | .create = rfcomm_sock_create |
net/bluetooth/sco.c
... | ... | @@ -993,7 +993,7 @@ |
993 | 993 | .getsockopt = sco_sock_getsockopt |
994 | 994 | }; |
995 | 995 | |
996 | -static struct net_proto_family sco_sock_family_ops = { | |
996 | +static const struct net_proto_family sco_sock_family_ops = { | |
997 | 997 | .family = PF_BLUETOOTH, |
998 | 998 | .owner = THIS_MODULE, |
999 | 999 | .create = sco_sock_create, |
net/can/af_can.c
net/decnet/af_decnet.c
net/econet/af_econet.c
net/ieee802154/af_ieee802154.c
net/ipv4/af_inet.c
net/ipv6/af_inet6.c
net/ipx/af_ipx.c
... | ... | @@ -1927,7 +1927,7 @@ |
1927 | 1927 | * Socket family declarations |
1928 | 1928 | */ |
1929 | 1929 | |
1930 | -static struct net_proto_family ipx_family_ops = { | |
1930 | +static const struct net_proto_family ipx_family_ops = { | |
1931 | 1931 | .family = PF_IPX, |
1932 | 1932 | .create = ipx_create, |
1933 | 1933 | .owner = THIS_MODULE, |
net/irda/af_irda.c
net/iucv/af_iucv.c
... | ... | @@ -1715,7 +1715,7 @@ |
1715 | 1715 | .getsockopt = iucv_sock_getsockopt, |
1716 | 1716 | }; |
1717 | 1717 | |
1718 | -static struct net_proto_family iucv_sock_family_ops = { | |
1718 | +static const struct net_proto_family iucv_sock_family_ops = { | |
1719 | 1719 | .family = AF_IUCV, |
1720 | 1720 | .owner = THIS_MODULE, |
1721 | 1721 | .create = iucv_sock_create, |
net/key/af_key.c
... | ... | @@ -3644,7 +3644,7 @@ |
3644 | 3644 | .recvmsg = pfkey_recvmsg, |
3645 | 3645 | }; |
3646 | 3646 | |
3647 | -static struct net_proto_family pfkey_family_ops = { | |
3647 | +static const struct net_proto_family pfkey_family_ops = { | |
3648 | 3648 | .family = PF_KEY, |
3649 | 3649 | .create = pfkey_create, |
3650 | 3650 | .owner = THIS_MODULE, |
net/llc/af_llc.c
net/netlink/af_netlink.c
... | ... | @@ -2050,7 +2050,7 @@ |
2050 | 2050 | .sendpage = sock_no_sendpage, |
2051 | 2051 | }; |
2052 | 2052 | |
2053 | -static struct net_proto_family netlink_family_ops = { | |
2053 | +static const struct net_proto_family netlink_family_ops = { | |
2054 | 2054 | .family = PF_NETLINK, |
2055 | 2055 | .create = netlink_create, |
2056 | 2056 | .owner = THIS_MODULE, /* for consistency 8) */ |
net/netrom/af_netrom.c
... | ... | @@ -1372,7 +1372,7 @@ |
1372 | 1372 | }; |
1373 | 1373 | #endif /* CONFIG_PROC_FS */ |
1374 | 1374 | |
1375 | -static struct net_proto_family nr_family_ops = { | |
1375 | +static const struct net_proto_family nr_family_ops = { | |
1376 | 1376 | .family = PF_NETROM, |
1377 | 1377 | .create = nr_create, |
1378 | 1378 | .owner = THIS_MODULE, |
net/packet/af_packet.c
... | ... | @@ -2399,7 +2399,7 @@ |
2399 | 2399 | .sendpage = sock_no_sendpage, |
2400 | 2400 | }; |
2401 | 2401 | |
2402 | -static struct net_proto_family packet_family_ops = { | |
2402 | +static const struct net_proto_family packet_family_ops = { | |
2403 | 2403 | .family = PF_PACKET, |
2404 | 2404 | .create = packet_create, |
2405 | 2405 | .owner = THIS_MODULE, |
net/phonet/af_phonet.c
net/rds/af_rds.c
net/rose/af_rose.c
... | ... | @@ -1509,7 +1509,7 @@ |
1509 | 1509 | }; |
1510 | 1510 | #endif /* CONFIG_PROC_FS */ |
1511 | 1511 | |
1512 | -static struct net_proto_family rose_family_ops = { | |
1512 | +static const struct net_proto_family rose_family_ops = { | |
1513 | 1513 | .family = PF_ROSE, |
1514 | 1514 | .create = rose_create, |
1515 | 1515 | .owner = THIS_MODULE, |
net/rxrpc/af_rxrpc.c
... | ... | @@ -777,7 +777,7 @@ |
777 | 777 | .max_header = sizeof(struct rxrpc_header), |
778 | 778 | }; |
779 | 779 | |
780 | -static struct net_proto_family rxrpc_family_ops = { | |
780 | +static const struct net_proto_family rxrpc_family_ops = { | |
781 | 781 | .family = PF_RXRPC, |
782 | 782 | .create = rxrpc_create, |
783 | 783 | .owner = THIS_MODULE, |
net/unix/af_unix.c
net/x25/af_x25.c