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>
This commit is contained in:
Jon Paul Maloy
2014-03-12 11:31:12 -04:00
committed by David S. Miller
parent 3b4f302d85
commit 58ed944241
3 changed files with 98 additions and 84 deletions

View File

@@ -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);