diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2006-03-21 01:37:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:37:04 -0500 |
commit | 05790c6456f144024e655710347b3df499260374 (patch) | |
tree | 389e85554c0ce7cf732998f2ac9dfeb441e85320 /net/tipc/port.c | |
parent | 1fc54d8f49c1270c584803437fb7c0ac543588c1 (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/port.c')
-rw-r--r-- | net/tipc/port.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c index 294375cd9bda..4d3b7ccd2561 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -67,27 +67,27 @@ static struct sk_buff* port_build_peer_abort_msg(struct port *,u32 err); | |||
67 | static void port_timeout(unsigned long ref); | 67 | static void port_timeout(unsigned long ref); |
68 | 68 | ||
69 | 69 | ||
70 | static inline u32 port_peernode(struct port *p_ptr) | 70 | static u32 port_peernode(struct port *p_ptr) |
71 | { | 71 | { |
72 | return msg_destnode(&p_ptr->publ.phdr); | 72 | return msg_destnode(&p_ptr->publ.phdr); |
73 | } | 73 | } |
74 | 74 | ||
75 | static inline u32 port_peerport(struct port *p_ptr) | 75 | static u32 port_peerport(struct port *p_ptr) |
76 | { | 76 | { |
77 | return msg_destport(&p_ptr->publ.phdr); | 77 | return msg_destport(&p_ptr->publ.phdr); |
78 | } | 78 | } |
79 | 79 | ||
80 | static inline u32 port_out_seqno(struct port *p_ptr) | 80 | static u32 port_out_seqno(struct port *p_ptr) |
81 | { | 81 | { |
82 | return msg_transp_seqno(&p_ptr->publ.phdr); | 82 | return msg_transp_seqno(&p_ptr->publ.phdr); |
83 | } | 83 | } |
84 | 84 | ||
85 | static inline void port_set_out_seqno(struct port *p_ptr, u32 seqno) | 85 | static void port_set_out_seqno(struct port *p_ptr, u32 seqno) |
86 | { | 86 | { |
87 | msg_set_transp_seqno(&p_ptr->publ.phdr,seqno); | 87 | msg_set_transp_seqno(&p_ptr->publ.phdr,seqno); |
88 | } | 88 | } |
89 | 89 | ||
90 | static inline void port_incr_out_seqno(struct port *p_ptr) | 90 | static void port_incr_out_seqno(struct port *p_ptr) |
91 | { | 91 | { |
92 | struct tipc_msg *m = &p_ptr->publ.phdr; | 92 | struct tipc_msg *m = &p_ptr->publ.phdr; |
93 | 93 | ||
@@ -335,7 +335,7 @@ void *tipc_get_handle(const u32 ref) | |||
335 | return handle; | 335 | return handle; |
336 | } | 336 | } |
337 | 337 | ||
338 | static inline int port_unreliable(struct port *p_ptr) | 338 | static int port_unreliable(struct port *p_ptr) |
339 | { | 339 | { |
340 | return msg_src_droppable(&p_ptr->publ.phdr); | 340 | return msg_src_droppable(&p_ptr->publ.phdr); |
341 | } | 341 | } |
@@ -364,7 +364,7 @@ int tipc_set_portunreliable(u32 ref, unsigned int isunreliable) | |||
364 | return TIPC_OK; | 364 | return TIPC_OK; |
365 | } | 365 | } |
366 | 366 | ||
367 | static inline int port_unreturnable(struct port *p_ptr) | 367 | static int port_unreturnable(struct port *p_ptr) |
368 | { | 368 | { |
369 | return msg_dest_droppable(&p_ptr->publ.phdr); | 369 | return msg_dest_droppable(&p_ptr->publ.phdr); |
370 | } | 370 | } |