aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2006-03-21 01:37:04 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 01:37:04 -0500
commit05790c6456f144024e655710347b3df499260374 (patch)
tree389e85554c0ce7cf732998f2ac9dfeb441e85320 /net/tipc/socket.c
parent1fc54d8f49c1270c584803437fb7c0ac543588c1 (diff)
[TIPC]: Remove inlines from *.c
With reference to latest discussions on linux-kernel with respect to inline here is a patch for tipc to remove all inlines as used in the .c files. See also chapter 14 in Documentation/CodingStyle. Before: text data bss dec hex filename 102990 5292 1752 110034 1add2 tipc.o Now: text data bss dec hex filename 101190 5292 1752 108234 1a6ca tipc.o This is a nice text size reduction which will improve icache usage. In some cases bigger (> 4 lines) functions where declared inline and used in many places, they are most probarly no longer inlined by gcc resulting in the size reduction. There are several one liners that no longer are declared inline, but gcc should inline these just fine without the inline hint. With this patch applied one warning is added about an unused static function - that was hidded by utilising inline before. The function in question were kept so this patch is solely a inline removal patch. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Per Liden <per.liden@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index d1347d7da147..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 */
91static inline void sock_lock(struct tipc_sock* tsock) 91static 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 */
99static inline void sock_unlock(struct tipc_sock* tsock) 99static 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
122static inline u32 pollmask(struct socket *sock) 122static 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
147static inline void advance_queue(struct tipc_sock *tsock) 147static 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));
@@ -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
415static inline int dest_name_check(struct sockaddr_tipc *dest, struct msghdr *m) 415static 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
698static inline void set_orig_addr(struct msghdr *m, struct tipc_msg *msg) 698static 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
724static inline int anc_data_recv(struct msghdr *m, struct tipc_msg *msg, 724static 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];