Skip to content

Commit

Permalink
tipc: remove inline instances from C source files.
Browse files Browse the repository at this point in the history
Untie gcc's hands and let it do what it wants within the
individual source files.  There are two files, node.c and
port.c -- only the latter effectively changes (gcc-4.5.2).
Objdump shows gcc deciding to not inline port_peernode().

Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Paul Gortmaker authored and David S. Miller committed Apr 24, 2012
1 parent bfb253c commit 872f24d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/tipc/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static atomic_t tipc_num_links = ATOMIC_INIT(0);
* entries has been chosen so that no hash chain exceeds 8 nodes and will
* usually be much smaller (typically only a single node).
*/
static inline unsigned int tipc_hashfn(u32 addr)
static unsigned int tipc_hashfn(u32 addr)
{
return addr & (NODE_HTABLE_SIZE - 1);
}
Expand Down
4 changes: 2 additions & 2 deletions net/tipc/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ static struct sk_buff *port_build_peer_abort_msg(struct tipc_port *, u32 err);
static void port_timeout(unsigned long ref);


static inline u32 port_peernode(struct tipc_port *p_ptr)
static u32 port_peernode(struct tipc_port *p_ptr)
{
return msg_destnode(&p_ptr->phdr);
}

static inline u32 port_peerport(struct tipc_port *p_ptr)
static u32 port_peerport(struct tipc_port *p_ptr)
{
return msg_destport(&p_ptr->phdr);
}
Expand Down

0 comments on commit 872f24d

Please sign in to comment.