Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c68ca7b7 authored by Allan Stephens's avatar Allan Stephens Committed by David S. Miller
Browse files

tipc: add tipc_ prefix to fcns targeted for un-inlining



These functions have enough code in them such that they
seem like sensible targets for un-inlining.  Prior to doing
that, this adds the tipc_ prefix to the functions, so that
in the event of a panic dump or similar, the subsystem from
which the functions come from is immediately clear.

Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01fee256
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -67,7 +67,7 @@ static inline int may_route(u32 addr)
	return(addr ^ tipc_own_addr) >> 11;
	return(addr ^ tipc_own_addr) >> 11;
}
}


static inline int in_scope(u32 domain, u32 addr)
static inline int tipc_in_scope(u32 domain, u32 addr)
{
{
	if (!domain || (domain == addr))
	if (!domain || (domain == addr))
		return 1;
		return 1;
@@ -79,10 +79,10 @@ static inline int in_scope(u32 domain, u32 addr)
}
}


/**
/**
 * addr_scope - convert message lookup domain to equivalent 2-bit scope value
 * tipc_addr_scope - convert message lookup domain to a 2-bit scope value
 */
 */


static inline int addr_scope(u32 domain)
static inline int tipc_addr_scope(u32 domain)
{
{
	if (likely(!domain))
	if (likely(!domain))
		return TIPC_ZONE_SCOPE;
		return TIPC_ZONE_SCOPE;
@@ -110,7 +110,7 @@ static inline int addr_domain(int sc)
	return tipc_addr(tipc_zone(tipc_own_addr), 0, 0);
	return tipc_addr(tipc_zone(tipc_own_addr), 0, 0);
}
}


static inline char *addr_string_fill(char *string, u32 addr)
static inline char *tipc_addr_string_fill(char *string, u32 addr)
{
{
	snprintf(string, 16, "<%u.%u.%u>",
	snprintf(string, 16, "<%u.%u.%u>",
		 tipc_zone(addr), tipc_cluster(addr), tipc_node(addr));
		 tipc_zone(addr), tipc_cluster(addr), tipc_node(addr));
+1 −1
Original line number Original line Diff line number Diff line
@@ -275,7 +275,7 @@ static void bclink_send_nack(struct tipc_node *n_ptr)
	buf = buf_acquire(INT_H_SIZE);
	buf = buf_acquire(INT_H_SIZE);
	if (buf) {
	if (buf) {
		msg = buf_msg(buf);
		msg = buf_msg(buf);
		msg_init(msg, BCAST_PROTOCOL, STATE_MSG,
		tipc_msg_init(msg, BCAST_PROTOCOL, STATE_MSG,
			 INT_H_SIZE, n_ptr->addr);
			 INT_H_SIZE, n_ptr->addr);
		msg_set_mc_netid(msg, tipc_net_id);
		msg_set_mc_netid(msg, tipc_net_id);
		msg_set_bcast_ack(msg, mod(n_ptr->bclink.last_in));
		msg_set_bcast_ack(msg, mod(n_ptr->bclink.last_in));
+6 −6
Original line number Original line Diff line number Diff line
@@ -74,7 +74,7 @@ extern const char tipc_bclink_name[];




/**
/**
 * nmap_add - add a node to a node map
 * tipc_nmap_add - add a node to a node map
 */
 */


static inline void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node)
static inline void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node)
@@ -90,7 +90,7 @@ static inline void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node)
}
}


/**
/**
 * nmap_remove - remove a node from a node map
 * tipc_nmap_remove - remove a node from a node map
 */
 */


static inline void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node)
static inline void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node)
@@ -106,7 +106,7 @@ static inline void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node)
}
}


/**
/**
 * nmap_equal - test for equality of node maps
 * tipc_nmap_equal - test for equality of node maps
 */
 */


static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b)
static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b)
@@ -115,7 +115,7 @@ static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_m
}
}


/**
/**
 * nmap_diff - find differences between node maps
 * tipc_nmap_diff - find differences between node maps
 * @nm_a: input node map A
 * @nm_a: input node map A
 * @nm_b: input node map B
 * @nm_b: input node map B
 * @nm_diff: output node map A-B (i.e. nodes of A that are not in B)
 * @nm_diff: output node map A-B (i.e. nodes of A that are not in B)
@@ -143,7 +143,7 @@ static inline void tipc_nmap_diff(struct tipc_node_map *nm_a, struct tipc_node_m
}
}


/**
/**
 * port_list_add - add a port to a port list, ensuring no duplicates
 * tipc_port_list_add - add a port to a port list, ensuring no duplicates
 */
 */


static inline void tipc_port_list_add(struct port_list *pl_ptr, u32 port)
static inline void tipc_port_list_add(struct port_list *pl_ptr, u32 port)
@@ -176,7 +176,7 @@ static inline void tipc_port_list_add(struct port_list *pl_ptr, u32 port)
}
}


/**
/**
 * port_list_free - free dynamically created entries in port_list chain
 * tipc_port_list_free - free dynamically created entries in port_list chain
 *
 *
 * Note: First item is on stack, so it doesn't need to be released
 * Note: First item is on stack, so it doesn't need to be released
 */
 */
+2 −2
Original line number Original line Diff line number Diff line
@@ -493,7 +493,7 @@ int tipc_enable_bearer(const char *name, u32 bcast_scope, u32 priority)
		return -EINVAL;
		return -EINVAL;
	}
	}
	if (!tipc_addr_domain_valid(bcast_scope) ||
	if (!tipc_addr_domain_valid(bcast_scope) ||
	    !in_scope(bcast_scope, tipc_own_addr)) {
	    !tipc_in_scope(bcast_scope, tipc_own_addr)) {
		warn("Bearer <%s> rejected, illegal broadcast scope\n", name);
		warn("Bearer <%s> rejected, illegal broadcast scope\n", name);
		return -EINVAL;
		return -EINVAL;
	}
	}
@@ -571,7 +571,7 @@ restart:
	spin_lock_init(&b_ptr->publ.lock);
	spin_lock_init(&b_ptr->publ.lock);
	write_unlock_bh(&tipc_net_lock);
	write_unlock_bh(&tipc_net_lock);
	info("Enabled bearer <%s>, discovery domain %s, priority %u\n",
	info("Enabled bearer <%s>, discovery domain %s, priority %u\n",
	     name, addr_string_fill(addr_string, bcast_scope), priority);
	     name, tipc_addr_string_fill(addr_string, bcast_scope), priority);
	return 0;
	return 0;
failed:
failed:
	write_unlock_bh(&tipc_net_lock);
	write_unlock_bh(&tipc_net_lock);
+1 −1
Original line number Original line Diff line number Diff line
@@ -238,7 +238,7 @@ static struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest)
	if (buf) {
	if (buf) {
		msg = buf_msg(buf);
		msg = buf_msg(buf);
		memset((char *)msg, 0, size);
		memset((char *)msg, 0, size);
		msg_init(msg, ROUTE_DISTRIBUTOR, 0, INT_H_SIZE, dest);
		tipc_msg_init(msg, ROUTE_DISTRIBUTOR, 0, INT_H_SIZE, dest);
	}
	}
	return buf;
	return buf;
}
}
Loading