[PATCH net-next 01/20] tipc: Remove prototype code for supporting multiple zones

Previous thread: [PATCH net-next] sky2: implement 64 bit stats by Stephen Hemminger on Friday, December 31, 2010 - 6:34 pm. (2 messages)

Next thread: [PATCH] atl1: fix oops when changing tx/rx ring params by J. K. Cliburn on Saturday, January 1, 2011 - 8:02 am. (2 messages)
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

There really isn't a lot to see here technically.  There is a bunch of
stuff in TIPC that I guess falls into the category of "seemed like a
good idea at the time", but is now just inactive or at best unstable
prototype code for things like slave nodes and routing features and
mulitcluster support.  My favourite is this one:

 ----------
config TIPC_CLUSTERS
       int "Maximum number of clusters in a zone"
       depends on TIPC_ADVANCED
       range 1 1
       default "1"
       help
         Specifies how many clusters can be supported in a TIPC zone.

         *** Currently TIPC only supports a single cluster per zone. ***
 ----------

The remaining commits are just de-uglifying what is left, fixing whitespace
crimes and other common errors typically picked up in janitor patches.

Thanks,
Paul.

-----------------

Allan Stephens (19):
  tipc: Remove prototype code for supporting multiple zones
  tipc: Remove prototype code for supporting slave nodes
  tipc: Remove prototype code for supporting inter-cluster routing
  tipc: Remove prototype code for supporting multiple clusters
  tipc: Eliminate use of user registry by configuration service
  tipc: Eliminate use of user registry by topology service
  tipc: Remove user registry subsystem
  tipc: Remove internal linked list of node objects
  tipc: rename dbg.[ch] to log.[ch]
  tipc: remove calls to dbg() and msg_dbg()
  tipc: remove dump() and tipc_dump_dbg()
  tipc: Prune down link-specific debugging code
  tipc: Finish streamlining of debugging code
  tipc: remove redundant #includes
  tipc: remove pointless check for NULL prior to kfree
  tipc: cleanup various cosmetic whitespace issues
  tipc: split variable assignments out of conditional expressions
  tipc: remove zeroing assignments to static global variables
  tipc: remove extraneous braces from single statements

Paul Gortmaker (1):
  tipc: recode getsockopt error handling for better readability

 include/linux/tipc.h        |   18 +-
 ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Eliminates a sorted list TIPC uses to keep track of the neighboring
nodes it has links to, since this duplicates information already present
in the internal array of node object pointers.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/node.c |   43 ++++++++++++++++---------------------------
 1 files changed, 16 insertions(+), 27 deletions(-)

diff --git a/net/tipc/node.c b/net/tipc/node.c
index 58e189b..31dcca9 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -43,9 +43,6 @@
 static void node_lost_contact(struct tipc_node *n_ptr);
 static void node_established_contact(struct tipc_node *n_ptr);
 
-/* sorted list of nodes within cluster */
-static struct tipc_node *tipc_nodes = NULL;
-
 static DEFINE_SPINLOCK(node_create_lock);
 
 u32 tipc_own_tag = 0;
@@ -63,21 +60,17 @@ u32 tipc_own_tag = 0;
 struct tipc_node *tipc_node_create(u32 addr)
 {
 	struct tipc_node *n_ptr;
-	struct tipc_node **curr_node;
 	u32 n_num;
 
 	spin_lock_bh(&node_create_lock);
 
-	for (n_ptr = tipc_nodes; n_ptr; n_ptr = n_ptr->next) {
-		if (addr < n_ptr->addr)
-			break;
-		if (addr == n_ptr->addr) {
-			spin_unlock_bh(&node_create_lock);
-			return n_ptr;
-		}
+	n_ptr = tipc_node_find(addr);
+	if (n_ptr) {
+		spin_unlock_bh(&node_create_lock);
+		return n_ptr;
 	}
 
-	n_ptr = kzalloc(sizeof(*n_ptr),GFP_ATOMIC);
+	n_ptr = kzalloc(sizeof(*n_ptr), GFP_ATOMIC);
 	if (!n_ptr) {
 		spin_unlock_bh(&node_create_lock);
 		warn("Node creation failed, no memory\n");
@@ -93,15 +86,6 @@ struct tipc_node *tipc_node_create(u32 addr)
 	if (n_num > tipc_net.highest_node)
 		tipc_net.highest_node = n_num;
 
-	/* Insert node into ordered list */
-	for (curr_node = &tipc_nodes; *curr_node;
-	     curr_node = &(*curr_node)->next) {
-		if (addr < (*curr_node)->addr) {
-			n_ptr->next = *curr_node;
-			break;
-		}
-	}
-	(*curr_node) = n_ptr;
 ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Eliminates a number of #include statements that no longer serve any
useful purpose.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/addr.c       |    1 -
 net/tipc/bcast.c      |    1 -
 net/tipc/bearer.c     |    1 -
 net/tipc/config.c     |    1 -
 net/tipc/core.c       |    6 ------
 net/tipc/discover.c   |    2 --
 net/tipc/eth_media.c  |    4 ----
 net/tipc/msg.c        |    1 -
 net/tipc/name_distr.c |    1 -
 net/tipc/net.c        |    2 --
 net/tipc/node.c       |    1 -
 net/tipc/socket.c     |   11 -----------
 12 files changed, 0 insertions(+), 32 deletions(-)

diff --git a/net/tipc/addr.c b/net/tipc/addr.c
index 483868a..88463d9 100644
--- a/net/tipc/addr.c
+++ b/net/tipc/addr.c
@@ -35,7 +35,6 @@
  */
 
 #include "core.h"
-#include "node.h"
 #include "addr.h"
 
 /**
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 22a10fa..c0f3b09 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -38,7 +38,6 @@
 #include "core.h"
 #include "link.h"
 #include "port.h"
-#include "name_distr.h"
 #include "bcast.h"
 
 #define MAX_PKT_DEFAULT_MCAST 1500	/* bcast link max packet size (fixed) */
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 24dc6c2..040f3ed 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -37,7 +37,6 @@
 #include "core.h"
 #include "config.h"
 #include "bearer.h"
-#include "port.h"
 #include "discover.h"
 
 #define MAX_ADDR_STR 32
diff --git a/net/tipc/config.c b/net/tipc/config.c
index a7894ff..6c67132 100644
--- a/net/tipc/config.c
+++ b/net/tipc/config.c
@@ -36,7 +36,6 @@
 
 #include "core.h"
 #include "port.h"
-#include "link.h"
 #include "name_table.h"
 #include "config.h"
 
diff --git a/net/tipc/core.c b/net/tipc/core.c
index a02bc49..60b85ec 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -34,14 +34,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

As the first step in removing obsolete debugging code from TIPC the
files that implement TIPC's non-debug-related log buffer subsystem
are renamed to better reflect their true nature.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/Makefile |    2 +-
 net/tipc/core.h   |    2 +-
 net/tipc/dbg.c    |  432 -----------------------------------------------------
 net/tipc/dbg.h    |   67 --------
 net/tipc/link.h   |    2 +-
 net/tipc/log.c    |  428 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 net/tipc/log.h    |   67 ++++++++
 7 files changed, 498 insertions(+), 502 deletions(-)
 delete mode 100644 net/tipc/dbg.c
 delete mode 100644 net/tipc/dbg.h
 create mode 100644 net/tipc/log.c
 create mode 100644 net/tipc/log.h

diff --git a/net/tipc/Makefile b/net/tipc/Makefile
index d41cd11..521d24d 100644
--- a/net/tipc/Makefile
+++ b/net/tipc/Makefile
@@ -8,6 +8,6 @@ tipc-y	+= addr.o bcast.o bearer.o config.o \
 	   core.o handler.o link.o discover.o msg.o  \
 	   name_distr.o  subscr.o name_table.o net.o  \
 	   netlink.o node.o node_subscr.o port.o ref.o  \
-	   socket.o dbg.o eth_media.o
+	   socket.o log.o eth_media.o
 
 # End of file
diff --git a/net/tipc/core.h b/net/tipc/core.h
index c44f955..17f3670 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -59,7 +59,7 @@
 #define TIPC_MOD_VER "2.0.0"
 
 struct tipc_msg;	/* msg.h */
-struct print_buf;	/* dbg.h */
+struct print_buf;	/* log.h */
 
 /*
  * TIPC sanity test macros
diff --git a/net/tipc/dbg.c b/net/tipc/dbg.c
deleted file mode 100644
index 46f51d2..0000000
--- a/net/tipc/dbg.c
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- * net/tipc/dbg.c: TIPC print buffer routines for debugging
- *
- * Copyright (c) 1996-2006, Ericsson AB
- * Copyright (c) 2005-2007, Wind River Systems
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Cleans up TIPC's source code to eliminate the presence of unnecessary
use of {} around single statements.

These changes are purely cosmetic and do not alter the operation of TIPC
in any way.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/bcast.c      |    6 ++----
 net/tipc/bearer.c     |    3 +--
 net/tipc/link.c       |   25 +++++++++----------------
 net/tipc/msg.c        |   15 ++++++---------
 net/tipc/name_table.c |    6 ++----
 net/tipc/port.c       |    6 ++----
 net/tipc/socket.c     |   14 +++++---------
 7 files changed, 27 insertions(+), 48 deletions(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 99a1469..70ab5ef 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -196,9 +196,8 @@ static void bclink_retransmit_pkt(u32 after, u32 to)
 	struct sk_buff *buf;
 
 	buf = bcl->first_out;
-	while (buf && less_eq(buf_seqno(buf), after)) {
+	while (buf && less_eq(buf_seqno(buf), after))
 		buf = buf->next;
-	}
 	tipc_link_retransmit(bcl, buf, mod(to - after));
 }
 
@@ -224,9 +223,8 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
 	/* Skip over packets that node has previously acknowledged */
 
 	crs = bcl->first_out;
-	while (crs && less_eq(buf_seqno(crs), n_ptr->bclink.acked)) {
+	while (crs && less_eq(buf_seqno(crs), n_ptr->bclink.acked))
 		crs = crs->next;
-	}
 
 	/* Update packets that node is now acknowledging */
 
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 68e7290..837b7a4 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -194,9 +194,8 @@ void tipc_media_addr_printf(struct print_buf *pb, struct tipc_media_addr *a)
 		unchar *addr = (unchar *)&a->dev_addr;
 
 		tipc_printf(pb, "UNKNOWN(%u)", media_type);
-		for (i = 0; i < (sizeof(*a) - sizeof(a->type)); i++) {
+		for (i = 0; i < (sizeof(*a) - sizeof(a->type)); i++)
 			tipc_printf(pb, "-%02x", ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Cleans up TIPC's source code to eliminate the needless initialization
of static variables to zero.

These changes are purely cosmetic and do not alter the operation of TIPC
in any way.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/bcast.c      |    8 ++++----
 net/tipc/bearer.c     |    2 +-
 net/tipc/eth_media.c  |    2 +-
 net/tipc/handler.c    |    2 +-
 net/tipc/name_distr.c |    2 +-
 net/tipc/name_table.c |    2 +-
 net/tipc/node.c       |    2 +-
 net/tipc/port.c       |    4 ++--
 net/tipc/ref.c        |    2 +-
 net/tipc/socket.c     |    2 +-
 net/tipc/subscr.c     |    2 +-
 11 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 9de3256..99a1469 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -103,9 +103,9 @@ struct bclink {
 };
 
 
-static struct bcbearer *bcbearer = NULL;
-static struct bclink *bclink = NULL;
-static struct link *bcl = NULL;
+static struct bcbearer *bcbearer;
+static struct bclink *bclink;
+static struct link *bcl;
 static DEFINE_SPINLOCK(bc_lock);
 
 /* broadcast-capable node map */
@@ -425,7 +425,7 @@ int tipc_bclink_send_msg(struct sk_buff *buf)
 void tipc_bclink_recv_pkt(struct sk_buff *buf)
 {
 #if (TIPC_BCAST_LOSS_RATE)
-	static int rx_count = 0;
+	static int rx_count;
 #endif
 	struct tipc_msg *msg = buf_msg(buf);
 	struct tipc_node *node = tipc_node_find(msg_prevnode(msg));
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index e9136f0..68e7290 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -42,7 +42,7 @@
 #define MAX_ADDR_STR 32
 
 static struct media media_list[MAX_MEDIA];
-static u32 media_count = 0;
+static u32 media_count;
 
 struct bearer tipc_bearers[MAX_BEARERS];
 
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c
index 5dfe663..b69092e 100644
--- a/net/tipc/eth_media.c
+++ ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Simplifies TIPC's configuration service so that it no longer registers
its port with the user registry, since the service doesn't take advantage
of any of the registry's capabilities.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/config.c |   26 +++++++-------------------
 1 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/net/tipc/config.c b/net/tipc/config.c
index bc51210..322367b 100644
--- a/net/tipc/config.c
+++ b/net/tipc/config.c
@@ -38,15 +38,9 @@
 #include "port.h"
 #include "link.h"
 #include "name_table.h"
-#include "user_reg.h"
 #include "config.h"
 
-struct manager {
-	u32 user_ref;
-	u32 port_ref;
-};
-
-static struct manager mng = { 0};
+static u32 config_port_ref;
 
 static DEFINE_SPINLOCK(config_lock);
 
@@ -506,20 +500,16 @@ int tipc_cfg_init(void)
 	struct tipc_name_seq seq;
 	int res;
 
-	res = tipc_attach(&mng.user_ref);
-	if (res)
-		goto failed;
-
-	res = tipc_createport(mng.user_ref, NULL, TIPC_CRITICAL_IMPORTANCE,
+	res = tipc_createport(0, NULL, TIPC_CRITICAL_IMPORTANCE,
 			      NULL, NULL, NULL,
 			      NULL, cfg_named_msg_event, NULL,
-			      NULL, &mng.port_ref);
+			      NULL, &config_port_ref);
 	if (res)
 		goto failed;
 
 	seq.type = TIPC_CFG_SRV;
 	seq.lower = seq.upper = tipc_own_addr;
-	res = tipc_nametbl_publish_rsv(mng.port_ref, TIPC_ZONE_SCOPE, &seq);
+	res = tipc_nametbl_publish_rsv(config_port_ref, TIPC_ZONE_SCOPE, &seq);
 	if (res)
 		goto failed;
 
@@ -527,15 +517,13 @@ int tipc_cfg_init(void)
 
 failed:
 	err("Unable to create configuration service\n");
-	tipc_detach(mng.user_ref);
-	mng.user_ref = 0;
 	return res;
 }
 
 void tipc_cfg_stop(void)
 {
-	if (mng.user_ref) {
-		tipc_detach(mng.user_ref);
-		mng.user_ref = 0;
+	if (config_port_ref) {
+		tipc_deleteport(config_port_ref);
+		config_port_ref = 0;
 	}
 }
-- 
1.7.3.3

--

From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

It is acceptable to call kfree() with NULL, so these checks are not
serving any useful purpose.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/name_distr.c |    4 +---
 net/tipc/port.c       |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index 376a30b..a6c989f 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -240,9 +240,7 @@ static void node_is_down(struct publication *publ)
 		    publ->type, publ->lower, publ->node, publ->ref, publ->key);
 	}
 
-	if (p) {
-		kfree(p);
-	}
+	kfree(p);
 }
 
 /**
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 8bacd57..db14b7e 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -269,9 +269,7 @@ int tipc_deleteport(u32 ref)
 		buf = port_build_peer_abort_msg(p_ptr, TIPC_ERR_NO_PORT);
 		tipc_nodesub_unsubscribe(&p_ptr->subscription);
 	}
-	if (p_ptr->user_port) {
-		kfree(p_ptr->user_port);
-	}
+	kfree(p_ptr->user_port);
 
 	spin_lock_bh(&tipc_port_list_lock);
 	list_del(&p_ptr->port_list);
-- 
1.7.3.3

--

From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Simplifies routines and data structures that were intended to allow
TIPC to support slave nodes (i.e. nodes that did not have links to
all of the other nodes in its cluster, forcing TIPC to route messages
that it could not deliver directly through a non-slave node).

Currently, TIPC supports only networks containing non-slave nodes,
so this code is unnecessary.

Note: The latest edition of the TIPC 2.0 Specification has eliminated
the concept of slave nodes entirely.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/tipc_config.h |    4 +-
 net/tipc/addr.c             |    2 -
 net/tipc/addr.h             |   10 ---
 net/tipc/cluster.c          |  166 +++++-------------------------------------
 net/tipc/cluster.h          |    7 --
 net/tipc/config.c           |   21 +-----
 net/tipc/core.c             |    6 --
 net/tipc/core.h             |    1 -
 net/tipc/discover.c         |    4 -
 net/tipc/msg.h              |    2 +-
 net/tipc/node.c             |   59 ++++------------
 net/tipc/port.c             |    5 +-
 12 files changed, 40 insertions(+), 247 deletions(-)

diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h
index fa3aeaa..dcc2b87 100644
--- a/include/linux/tipc_config.h
+++ b/include/linux/tipc_config.h
@@ -97,7 +97,7 @@
 #define  TIPC_CMD_GET_MAX_ZONES     0x4007    /* obsoleted */
 #define  TIPC_CMD_GET_MAX_CLUSTERS  0x4008    /* tx none, rx unsigned */
 #define  TIPC_CMD_GET_MAX_NODES     0x4009    /* tx none, rx unsigned */
-#define  TIPC_CMD_GET_MAX_SLAVES    0x400A    /* tx none, rx unsigned */
+#define  TIPC_CMD_GET_MAX_SLAVES    0x400A    /* obsoleted */
 #define  TIPC_CMD_GET_NETID         0x400B    /* tx none, rx unsigned */
 
 #define  TIPC_CMD_ENABLE_BEARER     0x4101    /* tx bearer_config, rx none */
@@ -133,7 +133,7 @@
 #define  TIPC_CMD_SET_MAX_ZONES     0x8007    /* obsoleted ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

The existing code for the copy to user and error handling at the
end of getsockopt isn't easy to follow, due to the excessive use
of if/else.  By simply using return where appropriate, it can be
made smaller and easier to follow at the same time.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/socket.c |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index f972c0b..1a2eb23 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1755,20 +1755,16 @@ static int getsockopt(struct socket *sock,
 
 	release_sock(sk);
 
-	if (res) {
-		/* "get" failed */
-	}
-	else if (len < sizeof(value)) {
-		res = -EINVAL;
-	}
-	else if (copy_to_user(ov, &value, sizeof(value))) {
-		res = -EFAULT;
-	}
-	else {
-		res = put_user(sizeof(value), ol);
-	}
+	if (res)
+		return res;	/* "get" failed */
 
-	return res;
+	if (len < sizeof(value))
+		return -EINVAL;
+
+	if (copy_to_user(ov, &value, sizeof(value)))
+		return -EFAULT;
+
+	return put_user(sizeof(value), ol);
 }
 
 /**
-- 
1.7.3.3

--

From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Completes the simplification of TIPC's debugging capabilities. By default
TIPC includes no debugging code, and any debugging code added by developers
that calls the dbg() and dbg_macros() is compiled out. If debugging support
is enabled, TIPC prints out some additional data about its internal state
when certain abnormal conditions occur, and any developer-added calls to the
TIPC debug macros are compiled in.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/Kconfig |   11 +++++++----
 net/tipc/core.h  |   47 +++++++++--------------------------------------
 net/tipc/log.c   |    4 +---
 net/tipc/msg.c   |    1 +
 4 files changed, 18 insertions(+), 45 deletions(-)

diff --git a/net/tipc/Kconfig b/net/tipc/Kconfig
index c02d3e9..0e7ce30 100644
--- a/net/tipc/Kconfig
+++ b/net/tipc/Kconfig
@@ -67,12 +67,15 @@ config TIPC_LOG
 	  managed remotely via TIPC.
 
 config TIPC_DEBUG
-	bool "Enable debug messages"
+	bool "Enable debugging support"
 	default n
 	help
-	  This enables debugging of TIPC.
+	  Saying Y here enables TIPC debugging capabilities used by developers.
+	  Most users do not need to bother; if unsure, just say N.
 
-	  Only say Y here if you are having trouble with TIPC.  It will
-	  enable the display of detailed information about what is going on.
+	  Enabling debugging support causes TIPC to display data about its
+	  internal state when certain abnormal conditions occur. It also
+	  makes it easy for developers to capture additional information of
+	  interest using the dbg() or msg_dbg() macros.
 
 endif # TIPC
diff --git a/net/tipc/core.h b/net/tipc/core.h
index 3af0b36..9971585 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -83,6 +83,7 @@ struct print_buf;	/* log.h */
  *       user-defined buffers can be configured to do the same thing.
  */
 extern struct print_buf *const TIPC_NULL;
+extern struct ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Cleans up TIPC's source code to eliminate assigning values to variables
within conditional expressions, improving code readability and reducing
warnings from various code checker tools.

These changes are purely cosmetic and do not alter the operation of TIPC
in any way.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/bearer.c |    3 ++-
 net/tipc/core.c   |   33 +++++++++++++++++++++------------
 net/tipc/link.c   |   16 ++++++++++------
 net/tipc/socket.c |   36 +++++++++++++++++++++++-------------
 4 files changed, 56 insertions(+), 32 deletions(-)

diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 040f3ed..e9136f0 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -251,7 +251,8 @@ static int bearer_name_validate(const char *name,
 	/* ensure all component parts of bearer name are present */
 
 	media_name = name_copy;
-	if ((if_name = strchr(media_name, ':')) == NULL)
+	if_name = strchr(media_name, ':');
+	if (if_name == NULL)
 		return 0;
 	*(if_name++) = 0;
 	media_len = if_name - media_name;
diff --git a/net/tipc/core.c b/net/tipc/core.c
index 60b85ec..e071579 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -115,10 +115,11 @@ int tipc_core_start_net(unsigned long addr)
 {
 	int res;
 
-	if ((res = tipc_net_start(addr)) ||
-	    (res = tipc_eth_media_start())) {
+	res = tipc_net_start(addr);
+	if (!res)
+		res = tipc_eth_media_start();
+	if (res)
 		tipc_core_stop_net();
-	}
 	return res;
 }
 
@@ -157,15 +158,22 @@ static int tipc_core_start(void)
 	get_random_bytes(&tipc_random, sizeof(tipc_random));
 	tipc_mode = TIPC_NODE_MODE;
 
-	if ((res = tipc_handler_start()) ||
-	    (res = tipc_ref_table_init(tipc_max_ports, tipc_random)) ||
-	    (res = tipc_nametbl_init()) ||
-	    (res = tipc_k_signal((Handler)tipc_subscr_start, 0)) ||
-	    (res = tipc_k_signal((Handler)tipc_cfg_init, 0)) ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Eliminates calls to two debugging macros that are being completely obsoleted,
as well as any associated debugging routines that are no longer required.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/core.h |    8 -----
 net/tipc/log.c  |   81 ++----------------------------------------------------
 2 files changed, 3 insertions(+), 86 deletions(-)

diff --git a/net/tipc/core.h b/net/tipc/core.h
index b4e54f8..3af0b36 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -145,23 +145,15 @@ void tipc_printf(struct print_buf *, const char *fmt, ...);
 		if (DBG_OUTPUT != TIPC_NULL) \
 			tipc_msg_dbg(DBG_OUTPUT, msg, txt); \
 	} while (0)
-#define dump(fmt, arg...) \
-	do { \
-		if (DBG_OUTPUT != TIPC_NULL) \
-			tipc_dump_dbg(DBG_OUTPUT, fmt, ##arg); \
-	} while (0)
 
 void tipc_msg_dbg(struct print_buf *, struct tipc_msg *, const char *);
-void tipc_dump_dbg(struct print_buf *, const char *fmt, ...);
 
 #else
 
 #define dbg(fmt, arg...)	do {} while (0)
 #define msg_dbg(msg, txt)	do {} while (0)
-#define dump(fmt, arg...)	do {} while (0)
 
 #define tipc_msg_dbg(...)	do {} while (0)
-#define tipc_dump_dbg(...)	do {} while (0)
 
 #endif
 
diff --git a/net/tipc/log.c b/net/tipc/log.c
index 9d99f70..2796044 100644
--- a/net/tipc/log.c
+++ b/net/tipc/log.c
@@ -64,9 +64,9 @@ struct print_buf *const TIPC_LOG = &log_buf;
  * 'print_string' when writing to a print buffer. This also protects against
  * concurrent writes to the print buffer being written to.
  *
- * 2) tipc_dump() and tipc_log_XXX() leverage the aforementioned
- * use of 'print_lock' to protect against all types of concurrent operations
- * on their associated print buffer (not just write operations).
+ * 2) tipc_log_XXX() leverages the aforementioned use of 'print_lock' to
+ * protect against all types of concurrent operations on their associated
+ * print ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Eliminates routines, data structures, and files that were intended
to allows TIPC to support a network containing multiple zones.
Currently, TIPC supports only networks consisting of a single cluster
within a single zone, so this code is unnecessary.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/tipc_config.h |    4 +-
 net/tipc/Kconfig            |   12 ---
 net/tipc/Makefile           |    2 +-
 net/tipc/addr.c             |    4 -
 net/tipc/cluster.c          |   14 +----
 net/tipc/cluster.h          |   12 +--
 net/tipc/config.c           |   30 ++-------
 net/tipc/core.c             |    6 --
 net/tipc/core.h             |    1 -
 net/tipc/net.c              |   41 +++++++----
 net/tipc/net.h              |    8 ++-
 net/tipc/node.c             |    7 +-
 net/tipc/node.h             |    1 -
 net/tipc/zone.c             |  159 -------------------------------------------
 net/tipc/zone.h             |   70 -------------------
 15 files changed, 46 insertions(+), 325 deletions(-)
 delete mode 100644 net/tipc/zone.c
 delete mode 100644 net/tipc/zone.h

diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h
index 9cde86c..fa3aeaa 100644
--- a/include/linux/tipc_config.h
+++ b/include/linux/tipc_config.h
@@ -94,7 +94,7 @@
 #define  TIPC_CMD_GET_MAX_PORTS     0x4004    /* tx none, rx unsigned */
 #define  TIPC_CMD_GET_MAX_PUBL      0x4005    /* tx none, rx unsigned */
 #define  TIPC_CMD_GET_MAX_SUBSCR    0x4006    /* tx none, rx unsigned */
-#define  TIPC_CMD_GET_MAX_ZONES     0x4007    /* tx none, rx unsigned */
+#define  TIPC_CMD_GET_MAX_ZONES     0x4007    /* obsoleted */
 #define  TIPC_CMD_GET_MAX_CLUSTERS  0x4008    /* tx none, rx unsigned */
 #define  TIPC_CMD_GET_MAX_NODES     0x4009    /* tx none, rx unsigned */
 #define  TIPC_CMD_GET_MAX_SLAVES    0x400A    /* tx none, rx unsigned */
@@ -130,7 ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Cleans up TIPC's source code to eliminate deviations from generally
accepted coding conventions relating to leading/trailing white space
and white space around commas, braces, cases, and sizeof.

These changes are purely cosmetic and do not alter the operation of TIPC
in any way.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/tipc.h        |   18 ++++++------
 include/linux/tipc_config.h |   59 +++++++++++++++++++++----------------------
 net/tipc/Kconfig            |    2 +-
 net/tipc/bcast.c            |    2 +-
 net/tipc/config.c           |    3 +-
 net/tipc/discover.c         |    2 +-
 net/tipc/eth_media.c        |    5 ++-
 net/tipc/link.c             |   31 ++++++++++------------
 net/tipc/link.h             |    4 +-
 net/tipc/msg.c              |   56 ++++++++++++++++++++--------------------
 net/tipc/msg.h              |    8 +++---
 net/tipc/name_table.c       |   14 +++++-----
 net/tipc/name_table.h       |    2 +-
 net/tipc/node.c             |    2 +-
 net/tipc/port.c             |   15 +++++------
 net/tipc/port.h             |    2 +-
 net/tipc/ref.c              |    6 +---
 net/tipc/socket.c           |   24 ++++++++---------
 net/tipc/subscr.c           |    2 +-
 19 files changed, 124 insertions(+), 133 deletions(-)

diff --git a/include/linux/tipc.h b/include/linux/tipc.h
index d10614b..1eefa3f 100644
--- a/include/linux/tipc.h
+++ b/include/linux/tipc.h
@@ -1,6 +1,6 @@
 /*
  * include/linux/tipc.h: Include file for TIPC socket interface
- * 
+ *
  * Copyright (c) 2003-2006, Ericsson AB
  * Copyright (c) 2005, Wind River Systems
  * All rights reserved.
@@ -42,7 +42,7 @@
 /*
  * TIPC addressing primitives
  */
- 
+
 struct tipc_portid {
 	__u32 ref;
 	__u32 node;
@@ -89,7 +89,7 @@ static inline unsigned int tipc_node(__u32 addr)
 #define TIPC_TOP_SRV		1	/* topology service name type */
 ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Eliminates obsolete calls to two of TIPC's main debugging macros, as well
as a pair of associated debugging routines that are no longer required.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/bcast.c      |    3 -
 net/tipc/bearer.c     |    1 -
 net/tipc/config.c     |    4 +-
 net/tipc/core.h       |    4 --
 net/tipc/discover.c   |    4 --
 net/tipc/link.c       |  119 +-----------------------------------------------
 net/tipc/name_distr.c |   14 ------
 net/tipc/name_table.c |   33 +-------------
 net/tipc/net.c        |   10 ----
 net/tipc/node.c       |    3 -
 net/tipc/port.c       |   10 ----
 net/tipc/port.h       |    1 -
 net/tipc/socket.c     |   39 ++++------------
 net/tipc/subscr.c     |    4 --
 14 files changed, 16 insertions(+), 233 deletions(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 110829e..cb817d5 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -436,8 +436,6 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf)
 	u32 seqno;
 	struct sk_buff *deferred;
 
-	msg_dbg(msg, "<BC<<<");
-
 	if (unlikely(!node || !tipc_node_is_up(node) || !node->bclink.supported ||
 		     (msg_mc_netid(msg) != tipc_net_id))) {
 		buf_discard(buf);
@@ -445,7 +443,6 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf)
 	}
 
 	if (unlikely(msg_user(msg) == BCAST_PROTOCOL)) {
-		msg_dbg(msg, "<BCNACK<<<");
 		if (msg_destnode(msg) == tipc_own_addr) {
 			tipc_node_lock(node);
 			tipc_bclink_acknowledge(node, msg_bcast_ack(msg));
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 885da94..24dc6c2 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -164,7 +164,6 @@ int  tipc_register_media(u32 media_type,
 	m_ptr->priority = bearer_priority;
 	m_ptr->tolerance = link_tolerance;
 	m_ptr->window = send_window_limit;
-	dbg("Media <%s> registered\n", name);
 	res = 0;
 exit:
 ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Eliminates most link-specific debugging code in TIPC, which is now
largely unnecessary. All calls to the link-specific debugging macros
have been removed, as are the macros themselves; in addition, the optional
allocation of print buffers to hold debugging information for each link
endpoint has been removed. The ability for TIPC to print out helpful
diagnostic information when link retransmit failures occur has been
retained for the time being, as an aid in tracking down the cause of
such failures.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/bcast.c |   13 ----
 net/tipc/link.c  |  167 ++++++++++++------------------------------------------
 net/tipc/link.h  |    3 -
 3 files changed, 36 insertions(+), 147 deletions(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index cb817d5..22a10fa 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -45,8 +45,6 @@
 
 #define BCLINK_WIN_DEFAULT 20		/* bcast link window size (default) */
 
-#define BCLINK_LOG_BUF_SIZE 0
-
 /*
  * Loss rate for incoming broadcast frames; used to test retransmission code.
  * Set to N to cause every N'th frame to be discarded; 0 => don't discard any.
@@ -774,7 +772,6 @@ int tipc_bclink_init(void)
 	bcbearer = kzalloc(sizeof(*bcbearer), GFP_ATOMIC);
 	bclink = kzalloc(sizeof(*bclink), GFP_ATOMIC);
 	if (!bcbearer || !bclink) {
- nomem:
 		warn("Multicast link creation failed, no memory\n");
 		kfree(bcbearer);
 		bcbearer = NULL;
@@ -799,14 +796,6 @@ int tipc_bclink_init(void)
 	bcl->state = WORKING_WORKING;
 	strlcpy(bcl->name, tipc_bclink_name, TIPC_MAX_LINK_NAME);
 
-	if (BCLINK_LOG_BUF_SIZE) {
-		char *pb = kmalloc(BCLINK_LOG_BUF_SIZE, GFP_ATOMIC);
-
-		if (!pb)
-			goto nomem;
-		tipc_printbuf_init(&bcl->print_buf, pb, BCLINK_LOG_BUF_SIZE);
-	}
-
 	return 0;
 }
 
@@ -815,8 +804,6 @@ void tipc_bclink_stop(void)
 ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Simplifies TIPC's network topology service so that it no longer registers
its ports with the user registry, since the service doesn't take advantage
of any of the registry's capabilities.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/subscr.c |   26 ++++++++++----------------
 1 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index 23f43d0..21abf17 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -36,7 +36,7 @@
 
 #include "core.h"
 #include "name_table.h"
-#include "user_reg.h"
+#include "port.h"
 #include "subscr.h"
 
 /**
@@ -64,7 +64,6 @@ struct subscriber {
  */
 
 struct top_srv {
-	u32 user_ref;
 	u32 setup_port;
 	atomic_t subscription_count;
 	struct list_head subscriber_list;
@@ -494,7 +493,7 @@ static void subscr_named_msg_event(void *usr_handle,
 
 	/* Create server port & establish connection to subscriber */
 
-	tipc_createport(topsrv.user_ref,
+	tipc_createport(0,
 			subscriber,
 			importance,
 			NULL,
@@ -549,13 +548,7 @@ int tipc_subscr_start(void)
 	INIT_LIST_HEAD(&topsrv.subscriber_list);
 
 	spin_lock_bh(&topsrv.lock);
-	res = tipc_attach(&topsrv.user_ref);
-	if (res) {
-		spin_unlock_bh(&topsrv.lock);
-		return res;
-	}
-
-	res = tipc_createport(topsrv.user_ref,
+	res = tipc_createport(0,
 			      NULL,
 			      TIPC_CRITICAL_IMPORTANCE,
 			      NULL,
@@ -570,16 +563,17 @@ int tipc_subscr_start(void)
 		goto failed;
 
 	res = tipc_nametbl_publish_rsv(topsrv.setup_port, TIPC_NODE_SCOPE, &seq);
-	if (res)
+	if (res) {
+		tipc_deleteport(topsrv.setup_port);
+		topsrv.setup_port = 0;
 		goto failed;
+	}
 
 	spin_unlock_bh(&topsrv.lock);
 	return 0;
 
 failed:
 	err("Failed to create subscription service\n");
-	tipc_detach(topsrv.user_ref);
-	topsrv.user_ref = 0;
 	spin_unlock_bh(&topsrv.lock);
 	return res;
 ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Eliminates routines, data structures, and files that were intended
to allow TIPC to support a network containing multiple clusters.
Currently, TIPC supports only networks consisting of a single cluster
within a single zone, so this code is unnecessary.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/tipc_config.h |    4 +-
 net/tipc/Kconfig            |   10 ---
 net/tipc/Makefile           |    2 +-
 net/tipc/addr.c             |    5 +-
 net/tipc/bcast.c            |    9 ++-
 net/tipc/bcast.h            |    1 +
 net/tipc/cluster.c          |  135 -------------------------------------------
 net/tipc/cluster.h          |   73 -----------------------
 net/tipc/config.c           |   21 +------
 net/tipc/core.c             |    6 --
 net/tipc/core.h             |    1 -
 net/tipc/name_distr.c       |   28 ++++++++-
 net/tipc/net.c              |   25 ++++++--
 net/tipc/net.h              |    8 ++-
 net/tipc/node.c             |   37 ++++++------
 net/tipc/node.h             |    7 +-
 16 files changed, 83 insertions(+), 289 deletions(-)
 delete mode 100644 net/tipc/cluster.c
 delete mode 100644 net/tipc/cluster.h

diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h
index 1f38df1..677aa13 100644
--- a/include/linux/tipc_config.h
+++ b/include/linux/tipc_config.h
@@ -95,7 +95,7 @@
 #define  TIPC_CMD_GET_MAX_PUBL      0x4005    /* tx none, rx unsigned */
 #define  TIPC_CMD_GET_MAX_SUBSCR    0x4006    /* tx none, rx unsigned */
 #define  TIPC_CMD_GET_MAX_ZONES     0x4007    /* obsoleted */
-#define  TIPC_CMD_GET_MAX_CLUSTERS  0x4008    /* tx none, rx unsigned */
+#define  TIPC_CMD_GET_MAX_CLUSTERS  0x4008    /* obsoleted */
 #define  TIPC_CMD_GET_MAX_NODES     0x4009    /* tx none, rx unsigned */
 #define  TIPC_CMD_GET_MAX_SLAVES    0x400A    /* obsoleted */
 #define  TIPC_CMD_GET_NETID         0x400B    /* ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Eliminates routines, data structures, and files that make up TIPC's
user registry. The user registry is no longer needed since the native
API routines that utilized it no longer exist and there are no longer
any internal TIPC services that use it.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/Makefile   |    2 +-
 net/tipc/config.c   |    2 +-
 net/tipc/core.c     |    3 -
 net/tipc/port.c     |   11 +--
 net/tipc/port.h     |    6 +-
 net/tipc/subscr.c   |    6 +-
 net/tipc/user_reg.c |  218 ---------------------------------------------------
 net/tipc/user_reg.h |   51 ------------
 8 files changed, 7 insertions(+), 292 deletions(-)
 delete mode 100644 net/tipc/user_reg.c
 delete mode 100644 net/tipc/user_reg.h

diff --git a/net/tipc/Makefile b/net/tipc/Makefile
index 849d819..d41cd11 100644
--- a/net/tipc/Makefile
+++ b/net/tipc/Makefile
@@ -8,6 +8,6 @@ tipc-y	+= addr.o bcast.o bearer.o config.o \
 	   core.o handler.o link.o discover.o msg.o  \
 	   name_distr.o  subscr.o name_table.o net.o  \
 	   netlink.o node.o node_subscr.o port.o ref.o  \
-	   socket.o user_reg.o dbg.o eth_media.o
+	   socket.o dbg.o eth_media.o
 
 # End of file
diff --git a/net/tipc/config.c b/net/tipc/config.c
index 322367b..afa6e85 100644
--- a/net/tipc/config.c
+++ b/net/tipc/config.c
@@ -500,7 +500,7 @@ int tipc_cfg_init(void)
 	struct tipc_name_seq seq;
 	int res;
 
-	res = tipc_createport(0, NULL, TIPC_CRITICAL_IMPORTANCE,
+	res = tipc_createport(NULL, TIPC_CRITICAL_IMPORTANCE,
 			      NULL, NULL, NULL,
 			      NULL, cfg_named_msg_event, NULL,
 			      NULL, &config_port_ref);
diff --git a/net/tipc/core.c b/net/tipc/core.c
index b9a3ef1..a02bc49 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -42,7 +42,6 @@
 #include "core.h"
 #include "ref.h"
 #include "net.h"
-#include "user_reg.h"
 #include "name_table.h"
 #include ...
From: Paul Gortmaker
Date: Friday, December 31, 2010 - 9:59 pm

From: Allan Stephens <Allan.Stephens@windriver.com>

Eliminates routines and data structures that were intended to allow
TIPC to route messages to other clusters. Currently, TIPC supports only
networks consisting of a single cluster within a single zone, so this
code is unnecessary.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/tipc_config.h |    5 -
 net/tipc/addr.h             |   15 ---
 net/tipc/cluster.c          |  279 +------------------------------------------
 net/tipc/cluster.h          |    8 --
 net/tipc/link.c             |   13 +-
 net/tipc/msg.h              |    7 +-
 net/tipc/net.c              |   45 -------
 net/tipc/net.h              |    4 -
 net/tipc/node.c             |  166 +------------------------
 net/tipc/node.h             |   21 ----
 10 files changed, 15 insertions(+), 548 deletions(-)

diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h
index dcc2b87..1f38df1 100644
--- a/include/linux/tipc_config.h
+++ b/include/linux/tipc_config.h
@@ -254,11 +254,6 @@ struct tipc_link_create {
 	struct tipc_media_addr peer_addr;
 	char bearer_name[TIPC_MAX_BEARER_NAME];
 };
-
-struct tipc_route_info {
-	__u32 dest;
-	__u32 router;
-};
 #endif
 
 /*
diff --git a/net/tipc/addr.h b/net/tipc/addr.h
index a16c6c8..2490fad 100644
--- a/net/tipc/addr.h
+++ b/net/tipc/addr.h
@@ -37,21 +37,6 @@
 #ifndef _TIPC_ADDR_H
 #define _TIPC_ADDR_H
 
-static inline u32 own_node(void)
-{
-	return tipc_node(tipc_own_addr);
-}
-
-static inline u32 own_cluster(void)
-{
-	return tipc_cluster(tipc_own_addr);
-}
-
-static inline u32 own_zone(void)
-{
-	return tipc_zone(tipc_own_addr);
-}
-
 static inline int in_own_cluster(u32 addr)
 {
 	return !((addr ^ tipc_own_addr) >> 12);
diff --git a/net/tipc/cluster.c b/net/tipc/cluster.c
index 6bc9f07..ba6f5bf 100644
--- a/net/tipc/cluster.c
+++ b/net/tipc/cluster.c
@@ -38,9 +38,6 @@
 #include ...
From: David Miller
Date: Saturday, January 1, 2011 - 2:59 pm

From: Paul Gortmaker <paul.gortmaker@windriver.com>

All applied, thanks Paul.

net/tipc/log.h still uses "_TIPC_DBG_H" for it's multiple-include protection
tests.  Please send me a patch to rename that to _TIPC_LOG_H

Thanks.
--

From: Paul Gortmaker
Date: Saturday, January 1, 2011 - 3:53 pm

Ah crap, I should have spotted that.  Thanks for noticing it.  Patch
follows.

Paul.

----

From 443eb42b4e3e45b54698ee787ce7e5fb16acb57d Mon Sep 17 00:00:00 2001
From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Sat, 1 Jan 2011 17:32:04 -0500
Subject: [PATCH] tipc: update log.h re-include protection to reflect new name

The tipc/dbg.h file was recently renamed to tipc/log.h,
but the re-include define was not updated accordingly.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/tipc/log.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/tipc/log.h b/net/tipc/log.h
index f4343bb..2248d96 100644
--- a/net/tipc/log.h
+++ b/net/tipc/log.h
@@ -34,8 +34,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef _TIPC_DBG_H
-#define _TIPC_DBG_H
+#ifndef _TIPC_LOG_H
+#define _TIPC_LOG_H
 
 /**
  * struct print_buf - TIPC print buffer structure
-- 
1.7.3.3

--

From: David Miller
Date: Saturday, January 1, 2011 - 3:56 pm

From: Paul Gortmaker <paul.gortmaker@windriver.com>

Applied, thanks Paul.
--

Previous thread: [PATCH net-next] sky2: implement 64 bit stats by Stephen Hemminger on Friday, December 31, 2010 - 6:34 pm. (2 messages)

Next thread: [PATCH] atl1: fix oops when changing tx/rx ring params by J. K. Cliburn on Saturday, January 1, 2011 - 8:02 am. (2 messages)