diff options
Diffstat (limited to 'net/tipc/socket.c')
| -rw-r--r-- | net/tipc/socket.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 67253bfcd702..648a734e6044 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
| @@ -88,7 +88,7 @@ static atomic_t tipc_queue_size = ATOMIC_INIT(0); | |||
| 88 | * with non-socket interfaces. | 88 | * with non-socket interfaces. |
| 89 | * See net.c for description of locking policy. | 89 | * See net.c for description of locking policy. |
| 90 | */ | 90 | */ |
| 91 | static inline void sock_lock(struct tipc_sock* tsock) | 91 | static void sock_lock(struct tipc_sock* tsock) |
| 92 | { | 92 | { |
| 93 | spin_lock_bh(tsock->p->lock); | 93 | spin_lock_bh(tsock->p->lock); |
| 94 | } | 94 | } |
| @@ -96,7 +96,7 @@ static inline void sock_lock(struct tipc_sock* tsock) | |||
| 96 | /* | 96 | /* |
| 97 | * sock_unlock(): Unlock a port/socket pair | 97 | * sock_unlock(): Unlock a port/socket pair |
| 98 | */ | 98 | */ |
| 99 | static inline void sock_unlock(struct tipc_sock* tsock) | 99 | static void sock_unlock(struct tipc_sock* tsock) |
| 100 | { | 100 | { |
| 101 | spin_unlock_bh(tsock->p->lock); | 101 | spin_unlock_bh(tsock->p->lock); |
| 102 | } | 102 | } |
| @@ -119,7 +119,7 @@ static inline void sock_unlock(struct tipc_sock* tsock) | |||
| 119 | * Returns pollmask value | 119 | * Returns pollmask value |
| 120 | */ | 120 | */ |
| 121 | 121 | ||
| 122 | static inline u32 pollmask(struct socket *sock) | 122 | static u32 pollmask(struct socket *sock) |
| 123 | { | 123 | { |
| 124 | u32 mask; | 124 | u32 mask; |
| 125 | 125 | ||
| @@ -144,7 +144,7 @@ static inline u32 pollmask(struct socket *sock) | |||
| 144 | * @tsock: TIPC socket | 144 | * @tsock: TIPC socket |
| 145 | */ | 145 | */ |
| 146 | 146 | ||
| 147 | static inline void advance_queue(struct tipc_sock *tsock) | 147 | static void advance_queue(struct tipc_sock *tsock) |
| 148 | { | 148 | { |
| 149 | sock_lock(tsock); | 149 | sock_lock(tsock); |
| 150 | buf_discard(skb_dequeue(&tsock->sk.sk_receive_queue)); | 150 | buf_discard(skb_dequeue(&tsock->sk.sk_receive_queue)); |
| @@ -178,7 +178,7 @@ static int tipc_create(struct socket *sock, int protocol) | |||
| 178 | if (unlikely(protocol != 0)) | 178 | if (unlikely(protocol != 0)) |
| 179 | return -EPROTONOSUPPORT; | 179 | return -EPROTONOSUPPORT; |
| 180 | 180 | ||
| 181 | ref = tipc_createport_raw(0, &dispatch, &wakeupdispatch, TIPC_LOW_IMPORTANCE); | 181 | ref = tipc_createport_raw(NULL, &dispatch, &wakeupdispatch, TIPC_LOW_IMPORTANCE); |
| 182 | if (unlikely(!ref)) | 182 | if (unlikely(!ref)) |
| 183 | return -ENOMEM; | 183 | return -ENOMEM; |
| 184 | 184 | ||
| @@ -265,7 +265,7 @@ static int release(struct socket *sock) | |||
| 265 | sock_lock(tsock); | 265 | sock_lock(tsock); |
| 266 | buf = skb_dequeue(&sk->sk_receive_queue); | 266 | buf = skb_dequeue(&sk->sk_receive_queue); |
| 267 | if (!buf) | 267 | if (!buf) |
| 268 | tsock->p->usr_handle = 0; | 268 | tsock->p->usr_handle = NULL; |
| 269 | sock_unlock(tsock); | 269 | sock_unlock(tsock); |
| 270 | if (!buf) | 270 | if (!buf) |
| 271 | break; | 271 | break; |
| @@ -319,7 +319,7 @@ static int bind(struct socket *sock, struct sockaddr *uaddr, int uaddr_len) | |||
| 319 | return -ERESTARTSYS; | 319 | return -ERESTARTSYS; |
| 320 | 320 | ||
| 321 | if (unlikely(!uaddr_len)) { | 321 | if (unlikely(!uaddr_len)) { |
| 322 | res = tipc_withdraw(tsock->p->ref, 0, 0); | 322 | res = tipc_withdraw(tsock->p->ref, 0, NULL); |
| 323 | goto exit; | 323 | goto exit; |
| 324 | } | 324 | } |
| 325 | 325 | ||
| @@ -412,7 +412,7 @@ static unsigned int poll(struct file *file, struct socket *sock, | |||
| 412 | * Returns 0 if permission is granted, otherwise errno | 412 | * Returns 0 if permission is granted, otherwise errno |
| 413 | */ | 413 | */ |
| 414 | 414 | ||
| 415 | static inline int dest_name_check(struct sockaddr_tipc *dest, struct msghdr *m) | 415 | static int dest_name_check(struct sockaddr_tipc *dest, struct msghdr *m) |
| 416 | { | 416 | { |
| 417 | struct tipc_cfg_msg_hdr hdr; | 417 | struct tipc_cfg_msg_hdr hdr; |
| 418 | 418 | ||
| @@ -695,7 +695,7 @@ static int auto_connect(struct socket *sock, struct tipc_sock *tsock, | |||
| 695 | * Note: Address is not captured if not requested by receiver. | 695 | * Note: Address is not captured if not requested by receiver. |
| 696 | */ | 696 | */ |
| 697 | 697 | ||
| 698 | static inline void set_orig_addr(struct msghdr *m, struct tipc_msg *msg) | 698 | static void set_orig_addr(struct msghdr *m, struct tipc_msg *msg) |
| 699 | { | 699 | { |
| 700 | struct sockaddr_tipc *addr = (struct sockaddr_tipc *)m->msg_name; | 700 | struct sockaddr_tipc *addr = (struct sockaddr_tipc *)m->msg_name; |
| 701 | 701 | ||
| @@ -721,7 +721,7 @@ static inline void set_orig_addr(struct msghdr *m, struct tipc_msg *msg) | |||
| 721 | * Returns 0 if successful, otherwise errno | 721 | * Returns 0 if successful, otherwise errno |
| 722 | */ | 722 | */ |
| 723 | 723 | ||
| 724 | static inline int anc_data_recv(struct msghdr *m, struct tipc_msg *msg, | 724 | static int anc_data_recv(struct msghdr *m, struct tipc_msg *msg, |
| 725 | struct tipc_port *tport) | 725 | struct tipc_port *tport) |
| 726 | { | 726 | { |
| 727 | u32 anc_data[3]; | 727 | u32 anc_data[3]; |
| @@ -1226,7 +1226,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen, | |||
| 1226 | { | 1226 | { |
| 1227 | struct tipc_sock *tsock = tipc_sk(sock->sk); | 1227 | struct tipc_sock *tsock = tipc_sk(sock->sk); |
| 1228 | struct sockaddr_tipc *dst = (struct sockaddr_tipc *)dest; | 1228 | struct sockaddr_tipc *dst = (struct sockaddr_tipc *)dest; |
| 1229 | struct msghdr m = {0,}; | 1229 | struct msghdr m = {NULL,}; |
| 1230 | struct sk_buff *buf; | 1230 | struct sk_buff *buf; |
| 1231 | struct tipc_msg *msg; | 1231 | struct tipc_msg *msg; |
| 1232 | int res; | 1232 | int res; |
| @@ -1251,7 +1251,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen, | |||
| 1251 | /* Send a 'SYN-' to destination */ | 1251 | /* Send a 'SYN-' to destination */ |
| 1252 | 1252 | ||
| 1253 | m.msg_name = dest; | 1253 | m.msg_name = dest; |
| 1254 | if ((res = send_msg(0, sock, &m, 0)) < 0) { | 1254 | if ((res = send_msg(NULL, sock, &m, 0)) < 0) { |
| 1255 | sock->state = SS_DISCONNECTING; | 1255 | sock->state = SS_DISCONNECTING; |
| 1256 | return res; | 1256 | return res; |
| 1257 | } | 1257 | } |
| @@ -1367,9 +1367,9 @@ static int accept(struct socket *sock, struct socket *newsock, int flags) | |||
| 1367 | 1367 | ||
| 1368 | msg_dbg(msg,"<ACC<: "); | 1368 | msg_dbg(msg,"<ACC<: "); |
| 1369 | if (!msg_data_sz(msg)) { | 1369 | if (!msg_data_sz(msg)) { |
| 1370 | struct msghdr m = {0,}; | 1370 | struct msghdr m = {NULL,}; |
| 1371 | 1371 | ||
| 1372 | send_packet(0, newsock, &m, 0); | 1372 | send_packet(NULL, newsock, &m, 0); |
| 1373 | advance_queue(tsock); | 1373 | advance_queue(tsock); |
| 1374 | } else { | 1374 | } else { |
| 1375 | sock_lock(tsock); | 1375 | sock_lock(tsock); |
