From 732efba4d77e1b0857984c401a7b18784f51b075 Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Thu, 23 Feb 2012 15:44:08 -0500 Subject: tipc: nuke the delimit static inline function. This "shortform" is actually longer than typing out what it is really trying to do, and just makes reading the code more difficult, so lets simply shoot it in the head. In the case of log.c - the comparison is on a u32, so we can drop the check for < 0 at the same time. Signed-off-by: Paul Gortmaker --- net/tipc/core.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'net/tipc/core.h') diff --git a/net/tipc/core.h b/net/tipc/core.h index 2761af3..1260b05 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h @@ -168,16 +168,6 @@ extern void tipc_netlink_stop(void); extern int tipc_socket_init(void); extern void tipc_socket_stop(void); -static inline int delimit(int val, int min, int max) -{ - if (val > max) - return max; - if (val < min) - return min; - return val; -} - - /* * TIPC timer and signal code */ -- cgit v1.1 From 5f6d9123f1c7ef7297b0da1620988fe16c738e75 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Fri, 4 Nov 2011 13:24:29 -0400 Subject: tipc: Eliminate trivial buffer manipulation helper routines Gets rid of two inlined routines that simply call existing sk_buff manipulation routines, since there is no longer any extra processing done by the helper routines. Note that these changes are essentially cosmetic in nature, and have no impact on the actual operation of TIPC. Signed-off-by: Allan Stephens Signed-off-by: Paul Gortmaker --- net/tipc/core.h | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'net/tipc/core.h') diff --git a/net/tipc/core.h b/net/tipc/core.h index 1260b05..aefe186 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h @@ -269,28 +269,4 @@ static inline struct tipc_msg *buf_msg(struct sk_buff *skb) extern struct sk_buff *tipc_buf_acquire(u32 size); -/** - * buf_discard - frees a TIPC message buffer - * @skb: message buffer - * - * Frees a message buffer. If passed NULL, just returns. - */ - -static inline void buf_discard(struct sk_buff *skb) -{ - kfree_skb(skb); -} - -/** - * buf_linearize - convert a TIPC message buffer into a single contiguous piece - * @skb: message buffer - * - * Returns 0 on success. - */ - -static inline int buf_linearize(struct sk_buff *skb) -{ - return skb_linearize(skb); -} - #endif -- cgit v1.1 From 077a26f029e76a5918edf9c1d44d5566eec719fc Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Tue, 8 Nov 2011 13:18:59 -0500 Subject: tipc: Eliminate obsolete support for "not running" mode Removes all references to TIPC's "not running" mode, since the removal of support for the native API means that there is no longer any way to interact with TIPC if it has not been initialized. The changes made consist of removing mode-based checks that are no longer needed, along with any associated code lying on non-executable control paths. Signed-off-by: Allan Stephens Signed-off-by: Paul Gortmaker --- net/tipc/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/tipc/core.h') diff --git a/net/tipc/core.h b/net/tipc/core.h index aefe186..9842ec0 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h @@ -132,7 +132,7 @@ void tipc_msg_dbg(struct print_buf *, struct tipc_msg *, const char *); /* * TIPC operating mode routines */ -#define TIPC_NOT_RUNNING 0 + #define TIPC_NODE_MODE 1 #define TIPC_NET_MODE 2 -- cgit v1.1 From b58343f9ea75f02ef48b984767511c6b3ba76eaf Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Tue, 8 Nov 2011 13:48:28 -0500 Subject: tipc: Eliminate support for tipc_mode global variable Removes all references to the global variable that records whether TIPC is running in "single node" mode or "network" mode, since this information can be easily deduced from the global variable that records TIPC's network address. (i.e. a non-zero network address means that TIPC is running in network mode.) The changes made update most existing mode-based checks to use the network address global variable. A few checks that are no longer needed are removed entirely, along with any associated code lying on non-executable control paths. Signed-off-by: Allan Stephens Signed-off-by: Paul Gortmaker --- net/tipc/core.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'net/tipc/core.h') diff --git a/net/tipc/core.h b/net/tipc/core.h index 9842ec0..13837e0 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h @@ -130,13 +130,6 @@ void tipc_msg_dbg(struct print_buf *, struct tipc_msg *, const char *); #define ELINKCONG EAGAIN /* link congestion <=> resource unavailable */ /* - * TIPC operating mode routines - */ - -#define TIPC_NODE_MODE 1 -#define TIPC_NET_MODE 2 - -/* * Global configuration variables */ @@ -151,7 +144,6 @@ extern int tipc_remote_management; * Other global variables */ -extern int tipc_mode; extern int tipc_random; extern const char tipc_alphabet[]; -- cgit v1.1