Commit a611e51e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sn: More klgraph.c clean up

From: Pat Gefre <pfg@sgi.com>

More klgraph.c clean up
Remove is_specified
parent 2bc43c92
...@@ -17,16 +17,6 @@ ...@@ -17,16 +17,6 @@
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
cpuid_t master_procid; cpuid_t master_procid;
char arg_maxnodes[4];
/*
* Return non-zero if the given variable was specified
*/
int
is_specified(char *s)
{
return (strlen(s) != 0);
}
/* /*
* Routines provided by ml/SN/promif.c. * Routines provided by ml/SN/promif.c.
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
extern char arg_maxnodes[]; extern char arg_maxnodes[];
void mark_cpuvertex_as_cpu(vertex_hdl_t vhdl, cpuid_t cpuid); void mark_cpuvertex_as_cpu(vertex_hdl_t vhdl, cpuid_t cpuid);
int is_specified(char *);
/* ARGSUSED */ /* ARGSUSED */
...@@ -125,7 +124,6 @@ klhwg_add_xbow(cnodeid_t cnode, nasid_t nasid) ...@@ -125,7 +124,6 @@ klhwg_add_xbow(cnodeid_t cnode, nasid_t nasid)
vertex_hdl_t xbow_v, hubv; vertex_hdl_t xbow_v, hubv;
/*REFERENCED*/ /*REFERENCED*/
graph_error_t err; graph_error_t err;
extern int is_specified(char *s);
if ((brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_IOBRICK_XBOW)) == NULL) if ((brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_IOBRICK_XBOW)) == NULL)
return; return;
...@@ -149,7 +147,7 @@ klhwg_add_xbow(cnodeid_t cnode, nasid_t nasid) ...@@ -149,7 +147,7 @@ klhwg_add_xbow(cnodeid_t cnode, nasid_t nasid)
hub_cnode = NASID_TO_COMPACT_NODEID(hub_nasid); hub_cnode = NASID_TO_COMPACT_NODEID(hub_nasid);
if (is_specified(arg_maxnodes) && hub_cnode == INVALID_CNODEID) { if (hub_cnode == INVALID_CNODEID) {
continue; continue;
} }
...@@ -340,7 +338,7 @@ klhwg_connect_one_router(vertex_hdl_t hwgraph_root, lboard_t *brd, ...@@ -340,7 +338,7 @@ klhwg_connect_one_router(vertex_hdl_t hwgraph_root, lboard_t *brd,
rc = hwgraph_traverse(hwgraph_root, path_buffer, &router_hndl); rc = hwgraph_traverse(hwgraph_root, path_buffer, &router_hndl);
if (rc != GRAPH_SUCCESS && is_specified(arg_maxnodes)) if (rc != GRAPH_SUCCESS)
return; return;
if (rc != GRAPH_SUCCESS) if (rc != GRAPH_SUCCESS)
...@@ -365,7 +363,7 @@ klhwg_connect_one_router(vertex_hdl_t hwgraph_root, lboard_t *brd, ...@@ -365,7 +363,7 @@ klhwg_connect_one_router(vertex_hdl_t hwgraph_root, lboard_t *brd,
port)); port));
continue; continue;
} }
if (is_specified(arg_maxnodes) && NASID_TO_COMPACT_NODEID(router->rou_port[port].port_nasid) if (NASID_TO_COMPACT_NODEID(router->rou_port[port].port_nasid)
== INVALID_CNODEID) { == INVALID_CNODEID) {
continue; continue;
} }
...@@ -380,7 +378,7 @@ klhwg_connect_one_router(vertex_hdl_t hwgraph_root, lboard_t *brd, ...@@ -380,7 +378,7 @@ klhwg_connect_one_router(vertex_hdl_t hwgraph_root, lboard_t *brd,
rc = hwgraph_traverse(hwgraph_root, dest_path, &dest_hndl); rc = hwgraph_traverse(hwgraph_root, dest_path, &dest_hndl);
if (rc != GRAPH_SUCCESS) { if (rc != GRAPH_SUCCESS) {
if (is_specified(arg_maxnodes) && KL_CONFIG_DUPLICATE_BOARD(dest_brd)) if (KL_CONFIG_DUPLICATE_BOARD(dest_brd))
continue; continue;
printk("Can't find router: %s", dest_path); printk("Can't find router: %s", dest_path);
return; return;
...@@ -466,7 +464,7 @@ klhwg_connect_hubs(vertex_hdl_t hwgraph_root) ...@@ -466,7 +464,7 @@ klhwg_connect_hubs(vertex_hdl_t hwgraph_root)
continue; /* Port not active */ continue; /* Port not active */
} }
if (is_specified(arg_maxnodes) && NASID_TO_COMPACT_NODEID(hub->hub_port[port].port_nasid) == INVALID_CNODEID) if (NASID_TO_COMPACT_NODEID(hub->hub_port[port].port_nasid) == INVALID_CNODEID)
continue; continue;
/* Generate a hardware graph path for this board. */ /* Generate a hardware graph path for this board. */
...@@ -486,7 +484,7 @@ klhwg_connect_hubs(vertex_hdl_t hwgraph_root) ...@@ -486,7 +484,7 @@ klhwg_connect_hubs(vertex_hdl_t hwgraph_root)
rc = hwgraph_traverse(hwgraph_root, dest_path, &dest_hndl); rc = hwgraph_traverse(hwgraph_root, dest_path, &dest_hndl);
if (rc != GRAPH_SUCCESS) { if (rc != GRAPH_SUCCESS) {
if (is_specified(arg_maxnodes) && KL_CONFIG_DUPLICATE_BOARD(dest_brd)) if (KL_CONFIG_DUPLICATE_BOARD(dest_brd))
continue; continue;
printk("Can't find board: %s", dest_path); printk("Can't find board: %s", dest_path);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment