nodemask.h: remove macro any_online_node
The macro any_online_node() is prone to producing sparse warnings due to the local symbol 'node'. Since all the in-tree users are really requesting the first online node (the mask argument is either NODE_MASK_ALL or node_online_map) just use the first_online_node macro and remove the any_online_node macro since there are no users. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Milton Miller <miltonm@bga.com> Cc: Nathan Fontenot <nfont@austin.ibm.com> Cc: Geoff Levand <geoffrey.levand@am.sony.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: J. Bruce Fields <bfields@fieldses.org> Cc: Neil Brown <neilb@suse.de> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: David S. Miller <davem@davemloft.net> Cc: Benny Halevy <bhalevy@panasas.com> Cc: Chuck Lever <chuck.lever@oracle.com> Cc: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
d554ed895d
commit
72c3368856
@@ -451,7 +451,7 @@ static int __cpuinit numa_setup_cpu(unsigned long lcpu)
|
||||
nid = of_node_to_nid_single(cpu);
|
||||
|
||||
if (nid < 0 || !node_online(nid))
|
||||
nid = any_online_node(NODE_MASK_ALL);
|
||||
nid = first_online_node;
|
||||
out:
|
||||
map_cpu_to_node(lcpu, nid);
|
||||
|
||||
@@ -1114,7 +1114,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
|
||||
int nid, found = 0;
|
||||
|
||||
if (!numa_enabled || (min_common_depth < 0))
|
||||
return any_online_node(NODE_MASK_ALL);
|
||||
return first_online_node;
|
||||
|
||||
memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
|
||||
if (memory) {
|
||||
@@ -1125,7 +1125,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
|
||||
}
|
||||
|
||||
if (nid < 0 || !node_online(nid))
|
||||
nid = any_online_node(NODE_MASK_ALL);
|
||||
nid = first_online_node;
|
||||
|
||||
if (NODE_DATA(nid)->node_spanned_pages)
|
||||
return nid;
|
||||
|
Reference in New Issue
Block a user