From: Pat Gefre More klgraph.c clean up Remove is_specified --- 25-akpm/arch/ia64/sn/io/sgi_io_sim.c | 10 ---------- 25-akpm/arch/ia64/sn/io/sn2/klgraph.c | 14 ++++++-------- 2 files changed, 6 insertions(+), 18 deletions(-) diff -puN arch/ia64/sn/io/sgi_io_sim.c~sn21 arch/ia64/sn/io/sgi_io_sim.c --- 25/arch/ia64/sn/io/sgi_io_sim.c~sn21 Thu Jan 8 15:18:55 2004 +++ 25-akpm/arch/ia64/sn/io/sgi_io_sim.c Thu Jan 8 15:18:55 2004 @@ -17,16 +17,6 @@ #include 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. diff -puN arch/ia64/sn/io/sn2/klgraph.c~sn21 arch/ia64/sn/io/sn2/klgraph.c --- 25/arch/ia64/sn/io/sn2/klgraph.c~sn21 Thu Jan 8 15:18:55 2004 +++ 25-akpm/arch/ia64/sn/io/sn2/klgraph.c Thu Jan 8 15:18:55 2004 @@ -31,7 +31,6 @@ extern char arg_maxnodes[]; void mark_cpuvertex_as_cpu(vertex_hdl_t vhdl, cpuid_t cpuid); -int is_specified(char *); /* ARGSUSED */ @@ -125,7 +124,6 @@ klhwg_add_xbow(cnodeid_t cnode, nasid_t vertex_hdl_t xbow_v, hubv; /*REFERENCED*/ graph_error_t err; - extern int is_specified(char *s); if ((brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_IOBRICK_XBOW)) == NULL) return; @@ -149,7 +147,7 @@ klhwg_add_xbow(cnodeid_t cnode, nasid_t hub_cnode = NASID_TO_COMPACT_NODEID(hub_nasid); - if (is_specified(arg_maxnodes) && hub_cnode == INVALID_CNODEID) { + if (hub_cnode == INVALID_CNODEID) { continue; } @@ -340,7 +338,7 @@ klhwg_connect_one_router(vertex_hdl_t hw rc = hwgraph_traverse(hwgraph_root, path_buffer, &router_hndl); - if (rc != GRAPH_SUCCESS && is_specified(arg_maxnodes)) + if (rc != GRAPH_SUCCESS) return; if (rc != GRAPH_SUCCESS) @@ -365,7 +363,7 @@ klhwg_connect_one_router(vertex_hdl_t hw port)); 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) { continue; } @@ -380,7 +378,7 @@ klhwg_connect_one_router(vertex_hdl_t hw rc = hwgraph_traverse(hwgraph_root, dest_path, &dest_hndl); if (rc != GRAPH_SUCCESS) { - if (is_specified(arg_maxnodes) && KL_CONFIG_DUPLICATE_BOARD(dest_brd)) + if (KL_CONFIG_DUPLICATE_BOARD(dest_brd)) continue; printk("Can't find router: %s", dest_path); return; @@ -466,7 +464,7 @@ klhwg_connect_hubs(vertex_hdl_t hwgraph_ 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; /* Generate a hardware graph path for this board. */ @@ -486,7 +484,7 @@ klhwg_connect_hubs(vertex_hdl_t hwgraph_ rc = hwgraph_traverse(hwgraph_root, dest_path, &dest_hndl); if (rc != GRAPH_SUCCESS) { - if (is_specified(arg_maxnodes) && KL_CONFIG_DUPLICATE_BOARD(dest_brd)) + if (KL_CONFIG_DUPLICATE_BOARD(dest_brd)) continue; printk("Can't find board: %s", dest_path); return; _