From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, allan.stephens@windriver.com,
ying.xue@windriver.com,
Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: [PATCH net-next 13/17] tipc: Eliminate obsolete support for "not running" mode
Date: Wed, 29 Feb 2012 18:18:39 -0500 [thread overview]
Message-ID: <1330557523-2024-14-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1330557523-2024-1-git-send-email-paul.gortmaker@windriver.com>
From: Allan Stephens <allan.stephens@windriver.com>
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 <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
net/tipc/config.c | 7 ++-----
net/tipc/core.c | 10 +---------
net/tipc/core.h | 2 +-
3 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/net/tipc/config.c b/net/tipc/config.c
index 69cca4f..7ca3854 100644
--- a/net/tipc/config.c
+++ b/net/tipc/config.c
@@ -252,11 +252,8 @@ static struct sk_buff *cfg_set_max_ports(void)
if (value < 127 || value > 65535)
return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
" (max ports must be 127-65535)");
- if (tipc_mode != TIPC_NOT_RUNNING)
- return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
- " (cannot change max ports while TIPC is active)");
- tipc_max_ports = value;
- return tipc_cfg_reply_none();
+ return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
+ " (cannot change max ports while TIPC is active)");
}
static struct sk_buff *cfg_set_netid(void)
diff --git a/net/tipc/core.c b/net/tipc/core.c
index 2691cd5..ec381d4 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -53,7 +53,7 @@
/* global variables used by multiple sub-systems within TIPC */
-int tipc_mode = TIPC_NOT_RUNNING;
+int tipc_mode;
int tipc_random;
const char tipc_alphabet[] =
@@ -125,11 +125,6 @@ int tipc_core_start_net(unsigned long addr)
static void tipc_core_stop(void)
{
- if (tipc_mode != TIPC_NODE_MODE)
- return;
-
- tipc_mode = TIPC_NOT_RUNNING;
-
tipc_netlink_stop();
tipc_handler_stop();
tipc_cfg_stop();
@@ -148,9 +143,6 @@ static int tipc_core_start(void)
{
int res;
- if (tipc_mode != TIPC_NOT_RUNNING)
- return -ENOPROTOOPT;
-
get_random_bytes(&tipc_random, sizeof(tipc_random));
tipc_mode = TIPC_NODE_MODE;
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
--
1.7.9.1
next prev parent reply other threads:[~2012-02-29 23:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 23:18 [PATCH net-next 00/17] Another batch of TIPC commits for 3.4 Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 01/17] tipc: Introduce node signature field in neighbor discovery message Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 02/17] tipc: Detect duplicate nodes using different network interfaces Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 03/17] tipc: Remove duplicate check of message destination node Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 04/17] tipc: Simplify enforcement of reserved name type prohibition Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 05/17] tipc: Add check to prevent insertion of duplicate name table entries Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 06/17] tipc: nuke the delimit static inline function Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 07/17] tipc: Eliminate a test for negative unsigned quantities Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 08/17] tipc: Hide internal details of node table implementation Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 09/17] tipc: Eliminate trivial buffer manipulation helper routines Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 10/17] tipc: Remove obsolete comments about routing table updates Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 11/17] tipc: Minor optimization to broadcast link synchronization logic Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 12/17] tipc: Revert name table translation optimization Paul Gortmaker
2012-02-29 23:18 ` Paul Gortmaker [this message]
2012-02-29 23:18 ` [PATCH net-next 14/17] tipc: Eliminate support for tipc_mode global variable Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 15/17] tipc: Un-inline port routine for processing incoming messages Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 16/17] tipc: Eliminate obsolete code for re-sending a message Paul Gortmaker
2012-02-29 23:18 ` [PATCH net-next 17/17] tipc: Optimize setting of immutable payload message header fields Paul Gortmaker
2012-03-01 4:52 ` [PATCH net-next 00/17] Another batch of TIPC commits for 3.4 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330557523-2024-14-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=allan.stephens@windriver.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ying.xue@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).