summaryrefslogtreecommitdiff
path: root/net/tipc/socket.h
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2014-03-12 11:31:12 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-12 15:53:49 -0400
commit58ed944241794087df1edadfa66795c966bf1604 (patch)
treee4cb6b821433736b14f038a74ce541b3a8b5d44f /net/tipc/socket.h
parent3b4f302d85785bb1c99b3db7f9557b256baa3805 (diff)
tipc: align usage of variable names and macros in socket
The practice of naming variables in TIPC is inconistent, sometimes even within the same file. In this commit we align variable names and declarations within socket.c, and function and macro names within socket.h. We also reduce the number of conversion macros to two, in order to make usage less obsure. These changes are purely cosmetic. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.h')
-rw-r--r--net/tipc/socket.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/net/tipc/socket.h b/net/tipc/socket.h
index a02d0bb0e2ab..74e5c7f195a6 100644
--- a/net/tipc/socket.h
+++ b/net/tipc/socket.h
@@ -57,19 +57,14 @@ static inline struct tipc_sock *tipc_sk(const struct sock *sk)
return container_of(sk, struct tipc_sock, sk);
}
-static inline struct tipc_port *tipc_sk_port(const struct sock *sk)
+static inline struct tipc_sock *tipc_port_to_sock(const struct tipc_port *port)
{
- return &(tipc_sk(sk)->port);
+ return container_of(port, struct tipc_sock, port);
}
-static inline struct sock *tipc_port_to_sk(const struct tipc_port *port)
+static inline void tipc_sock_wakeup(struct tipc_sock *tsk)
{
- return &(container_of(port, struct tipc_sock, port))->sk;
-}
-
-static inline void tipc_sk_wakeup(struct sock *sk)
-{
- sk->sk_write_space(sk);
+ tsk->sk.sk_write_space(&tsk->sk);
}
u32 tipc_sk_rcv(struct sock *sk, struct sk_buff *buf);