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

Commit 31e3c3f6 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

tipc: cleanup function namespace



Do some cleanups of TIPC based on make namespacecheck
  1. Don't export unused symbols
  2. Eliminate dead code
  3. Make functions and variables local
  4. Rename buf_acquire to tipc_buf_acquire since it is used in several files

Compile tested only.
This make break out of tree kernel modules that depend on TIPC routines.

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Acked-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Acked-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 15419227
Loading
Loading
Loading
Loading
+0 −71
Original line number Diff line number Diff line
@@ -50,8 +50,6 @@
 * TIPC operating mode routines
 */

u32 tipc_get_addr(void);

#define TIPC_NOT_RUNNING  0
#define TIPC_NODE_MODE    1
#define TIPC_NET_MODE     2
@@ -62,8 +60,6 @@ int tipc_attach(unsigned int *userref, tipc_mode_event, void *usr_handle);

void tipc_detach(unsigned int userref);

int tipc_get_mode(void);

/*
 * TIPC port manipulation routines
 */
@@ -153,12 +149,6 @@ int tipc_disconnect(u32 portref);

int tipc_shutdown(u32 ref);

int tipc_isconnected(u32 portref, int *isconnected);

int tipc_peer(u32 portref, struct tipc_portid *peer);

int tipc_ref_valid(u32 portref); 

/*
 * TIPC messaging routines
 */
@@ -170,38 +160,12 @@ int tipc_send(u32 portref,
	      unsigned int num_sect,
	      struct iovec const *msg_sect);

int tipc_send_buf(u32 portref,
		  struct sk_buff *buf,
		  unsigned int dsz);

int tipc_send2name(u32 portref, 
		   struct tipc_name const *name, 
		   u32 domain,
		   unsigned int num_sect,
		   struct iovec const *msg_sect);

int tipc_send_buf2name(u32 portref,
		       struct tipc_name const *name,
		       u32 domain,
		       struct sk_buff *buf,
		       unsigned int dsz);

int tipc_forward2name(u32 portref, 
		      struct tipc_name const *name, 
		      u32 domain,
		      unsigned int section_count,
		      struct iovec const *msg_sect,
		      struct tipc_portid const *origin,
		      unsigned int importance);

int tipc_forward_buf2name(u32 portref,
			  struct tipc_name const *name,
			  u32 domain,
			  struct sk_buff *buf,
			  unsigned int dsz,
			  struct tipc_portid const *orig,
			  unsigned int importance);

int tipc_send2port(u32 portref,
		   struct tipc_portid const *dest,
		   unsigned int num_sect,
@@ -212,46 +176,11 @@ int tipc_send_buf2port(u32 portref,
		       struct sk_buff *buf,
		       unsigned int dsz);

int tipc_forward2port(u32 portref,
		      struct tipc_portid const *dest,
		      unsigned int num_sect,
		      struct iovec const *msg_sect,
		      struct tipc_portid const *origin,
		      unsigned int importance);

int tipc_forward_buf2port(u32 portref,
			  struct tipc_portid const *dest,
			  struct sk_buff *buf,
			  unsigned int dsz,
			  struct tipc_portid const *orig,
			  unsigned int importance);

int tipc_multicast(u32 portref, 
		   struct tipc_name_seq const *seq, 
		   u32 domain,	/* currently unused */
		   unsigned int section_count,
		   struct iovec const *msg);

#if 0
int tipc_multicast_buf(u32 portref, 
		       struct tipc_name_seq const *seq, 
		       u32 domain,
		       void *buf,
		       unsigned int size);
#endif

/*
 * TIPC subscription routines
 */

int tipc_ispublished(struct tipc_name const *name);

/*
 * Get number of available nodes within specified domain (excluding own node)
 */

unsigned int tipc_available_nodes(const u32 domain);

#endif

#endif
+0 −2
Original line number Diff line number Diff line
@@ -88,8 +88,6 @@ void tipc_acknowledge(u32 port_ref,u32 ack);

struct tipc_port *tipc_get_port(const u32 ref);

void *tipc_get_handle(const u32 ref);

/*
 * The following routines require that the port be locked on entry
 */
+0 −5
Original line number Diff line number Diff line
@@ -41,11 +41,6 @@
#include "cluster.h"
#include "net.h"

u32 tipc_get_addr(void)
{
	return tipc_own_addr;
}

/**
 * tipc_addr_domain_valid - validates a network domain address
 *
+7 −3
Original line number Diff line number Diff line
@@ -121,6 +121,9 @@ static DEFINE_SPINLOCK(bc_lock);

const char tipc_bclink_name[] = "broadcast-link";

static void tipc_nmap_diff(struct tipc_node_map *nm_a,
			   struct tipc_node_map *nm_b,
			   struct tipc_node_map *nm_diff);

static u32 buf_seqno(struct sk_buff *buf)
{
@@ -287,7 +290,7 @@ static void bclink_send_nack(struct tipc_node *n_ptr)
	if (!less(n_ptr->bclink.gap_after, n_ptr->bclink.gap_to))
		return;

	buf = buf_acquire(INT_H_SIZE);
	buf = tipc_buf_acquire(INT_H_SIZE);
	if (buf) {
		msg = buf_msg(buf);
		tipc_msg_init(msg, BCAST_PROTOCOL, STATE_MSG,
@@ -871,7 +874,8 @@ void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node)
 * @nm_diff: output node map A-B (i.e. nodes of A that are not in B)
 */

void tipc_nmap_diff(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b,
static void tipc_nmap_diff(struct tipc_node_map *nm_a,
			   struct tipc_node_map *nm_b,
			   struct tipc_node_map *nm_diff)
{
	int stop = ARRAY_SIZE(nm_a->map);
+0 −3
Original line number Diff line number Diff line
@@ -84,9 +84,6 @@ static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_m
	return !memcmp(nm_a, nm_b, sizeof(*nm_a));
}

void tipc_nmap_diff(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b,
				  struct tipc_node_map *nm_diff);

void tipc_port_list_add(struct port_list *pl_ptr, u32 port);
void tipc_port_list_free(struct port_list *pl_ptr);

Loading