diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2010-03-05 16:42:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 14:26:31 -0500 |
commit | 72c3368856c543ace033f6a5b9a3edf1f4043236 (patch) | |
tree | 53fe8b4b19f42915a5f7d97bd1f779327dd534d4 /include/linux/nodemask.h | |
parent | d554ed895dc8f293cc712c71f14b101ace82579a (diff) |
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>
Diffstat (limited to 'include/linux/nodemask.h')
-rw-r--r-- | include/linux/nodemask.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 454997cccbd8..c4fa64b585ff 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -69,8 +69,6 @@ | |||
69 | * int node_online(node) Is some node online? | 69 | * int node_online(node) Is some node online? |
70 | * int node_possible(node) Is some node possible? | 70 | * int node_possible(node) Is some node possible? |
71 | * | 71 | * |
72 | * int any_online_node(mask) First online node in mask | ||
73 | * | ||
74 | * node_set_online(node) set bit 'node' in node_online_map | 72 | * node_set_online(node) set bit 'node' in node_online_map |
75 | * node_set_offline(node) clear bit 'node' in node_online_map | 73 | * node_set_offline(node) clear bit 'node' in node_online_map |
76 | * | 74 | * |
@@ -467,15 +465,6 @@ static inline int num_node_state(enum node_states state) | |||
467 | #define node_online_map node_states[N_ONLINE] | 465 | #define node_online_map node_states[N_ONLINE] |
468 | #define node_possible_map node_states[N_POSSIBLE] | 466 | #define node_possible_map node_states[N_POSSIBLE] |
469 | 467 | ||
470 | #define any_online_node(mask) \ | ||
471 | ({ \ | ||
472 | int node; \ | ||
473 | for_each_node_mask(node, (mask)) \ | ||
474 | if (node_online(node)) \ | ||
475 | break; \ | ||
476 | node; \ | ||
477 | }) | ||
478 | |||
479 | #define num_online_nodes() num_node_state(N_ONLINE) | 468 | #define num_online_nodes() num_node_state(N_ONLINE) |
480 | #define num_possible_nodes() num_node_state(N_POSSIBLE) | 469 | #define num_possible_nodes() num_node_state(N_POSSIBLE) |
481 | #define node_online(node) node_state((node), N_ONLINE) | 470 | #define node_online(node) node_state((node), N_ONLINE) |