diff options
Diffstat (limited to 'net/tipc/socket.c')
| -rw-r--r-- | net/tipc/socket.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 5577a447f531..09dc5b97e079 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
| @@ -34,12 +34,12 @@ | |||
| 34 | * POSSIBILITY OF SUCH DAMAGE. | 34 | * POSSIBILITY OF SUCH DAMAGE. |
| 35 | */ | 35 | */ |
| 36 | 36 | ||
| 37 | #include <linux/export.h> | ||
| 38 | #include <net/sock.h> | ||
| 39 | |||
| 40 | #include "core.h" | 37 | #include "core.h" |
| 41 | #include "port.h" | 38 | #include "port.h" |
| 42 | 39 | ||
| 40 | #include <linux/export.h> | ||
| 41 | #include <net/sock.h> | ||
| 42 | |||
| 43 | #define SS_LISTENING -1 /* socket is listening */ | 43 | #define SS_LISTENING -1 /* socket is listening */ |
| 44 | #define SS_READY -2 /* socket is connectionless */ | 44 | #define SS_READY -2 /* socket is connectionless */ |
| 45 | 45 | ||
| @@ -54,7 +54,7 @@ struct tipc_sock { | |||
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | #define tipc_sk(sk) ((struct tipc_sock *)(sk)) | 56 | #define tipc_sk(sk) ((struct tipc_sock *)(sk)) |
| 57 | #define tipc_sk_port(sk) ((struct tipc_port *)(tipc_sk(sk)->p)) | 57 | #define tipc_sk_port(sk) (tipc_sk(sk)->p) |
| 58 | 58 | ||
| 59 | #define tipc_rx_ready(sock) (!skb_queue_empty(&sock->sk->sk_receive_queue) || \ | 59 | #define tipc_rx_ready(sock) (!skb_queue_empty(&sock->sk->sk_receive_queue) || \ |
| 60 | (sock->state == SS_DISCONNECTING)) | 60 | (sock->state == SS_DISCONNECTING)) |
| @@ -1699,9 +1699,8 @@ static int getsockopt(struct socket *sock, | |||
| 1699 | return put_user(sizeof(value), ol); | 1699 | return put_user(sizeof(value), ol); |
| 1700 | } | 1700 | } |
| 1701 | 1701 | ||
| 1702 | /** | 1702 | /* Protocol switches for the various types of TIPC sockets */ |
| 1703 | * Protocol switches for the various types of TIPC sockets | 1703 | |
| 1704 | */ | ||
| 1705 | static const struct proto_ops msg_ops = { | 1704 | static const struct proto_ops msg_ops = { |
| 1706 | .owner = THIS_MODULE, | 1705 | .owner = THIS_MODULE, |
| 1707 | .family = AF_TIPC, | 1706 | .family = AF_TIPC, |
| @@ -1788,13 +1787,13 @@ int tipc_socket_init(void) | |||
| 1788 | 1787 | ||
| 1789 | res = proto_register(&tipc_proto, 1); | 1788 | res = proto_register(&tipc_proto, 1); |
| 1790 | if (res) { | 1789 | if (res) { |
| 1791 | err("Failed to register TIPC protocol type\n"); | 1790 | pr_err("Failed to register TIPC protocol type\n"); |
| 1792 | goto out; | 1791 | goto out; |
| 1793 | } | 1792 | } |
| 1794 | 1793 | ||
| 1795 | res = sock_register(&tipc_family_ops); | 1794 | res = sock_register(&tipc_family_ops); |
| 1796 | if (res) { | 1795 | if (res) { |
| 1797 | err("Failed to register TIPC socket type\n"); | 1796 | pr_err("Failed to register TIPC socket type\n"); |
| 1798 | proto_unregister(&tipc_proto); | 1797 | proto_unregister(&tipc_proto); |
| 1799 | goto out; | 1798 | goto out; |
| 1800 | } | 1799 | } |
