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/name_table.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/name_table.c')
-rw-r--r-- | net/tipc/name_table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index a865954bd95c..7be44d4aab75 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c | |||
@@ -104,7 +104,7 @@ static atomic_t rsv_publ_ok = ATOMIC_INIT(0); | |||
104 | rwlock_t tipc_nametbl_lock = RW_LOCK_UNLOCKED; | 104 | rwlock_t tipc_nametbl_lock = RW_LOCK_UNLOCKED; |
105 | 105 | ||
106 | 106 | ||
107 | static inline int hash(int x) | 107 | static int hash(int x) |
108 | { | 108 | { |
109 | return(x & (tipc_nametbl_size - 1)); | 109 | return(x & (tipc_nametbl_size - 1)); |
110 | } | 110 | } |
@@ -190,8 +190,8 @@ struct name_seq *tipc_nameseq_create(u32 type, struct hlist_head *seq_head) | |||
190 | * Very time-critical, so binary searches through sub-sequence array. | 190 | * Very time-critical, so binary searches through sub-sequence array. |
191 | */ | 191 | */ |
192 | 192 | ||
193 | static inline struct sub_seq *nameseq_find_subseq(struct name_seq *nseq, | 193 | static struct sub_seq *nameseq_find_subseq(struct name_seq *nseq, |
194 | u32 instance) | 194 | u32 instance) |
195 | { | 195 | { |
196 | struct sub_seq *sseqs = nseq->sseqs; | 196 | struct sub_seq *sseqs = nseq->sseqs; |
197 | int low = 0; | 197 | int low = 0; |