nodmask.h: remove macro any_online_node
Subsystems (6)
PATCH 1/1 nodmask.h: remove macro any_online_node
nodmask.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.
---
arch/powerpc/mm/numa.c +3 -3
@@ -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;
include/linux/nodemask.h +0 -11
@@ -69,8 +69,6 @@* int node_online(node) Is some node online? * int node_possible(node) Is some node possible? * -* int any_online_node(mask) First online node in mask -* * node_set_online(node) set bit 'node' in node_online_map * node_set_offline(node) clear bit 'node' in node_online_map *
@@ -467,15 +465,6 @@ static inline int num_node_state(enum node_states state)#define node_online_map node_states[N_ONLINE]#define node_possible_map node_states[N_POSSIBLE] -#define any_online_node (mask) \ -({ \ - int node; \ - for_each_node_mask(node, (mask)) \ - if (node_online(node)) \ - break; \ - node; \ -}) -#define num_online_nodes () num_node_state(N_ONLINE)#define num_possible_nodes () num_node_state(N_POSSIBLE)#define node_online (node) node_state((node), N_ONLINE)
net/sunrpc/svc.c +1 -1
@@ -133,7 +133,7 @@ svc_pool_map_choose_mode(void)return SVC_POOL_PERNODE ; } - node =any_online_node (node_online_map); + node = first_online_node;if (nr_cpus_node (node) >2 ) {/* * Non-trivial SMP, or CONFIG_NUMA on
Quoted 8 lines · On Wed, 6 Jan 2010 16:24:58 -0700 H Hartley Sweeten…
nodmask.h: remove macroany_online_nodeThe macro
any_online_nodeis 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 eitherNODE_MASK_ALLornode_online_map) just use thefirst_online_nodemacro and remove theany_online_nodemacro since there are no users.
Thank you.
BTW, it's better to add diffstat to this kind of changes.
Regards,
-Kame
Quoted 97 lines
Signed-off-by H Hartley Sweeten <[email protected]>Cc Andrew Morton <akpm-de/[email protected]>Cc David Rientjes <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Cc Lee Schermerhorn <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Dave Hansen <[email protected]>Cc Milton Miller <miltonm-ogEGBHC/[email protected]>Cc Nathan Fontenot <[email protected]>Cc Geoff Levand <[email protected]>Cc Grant Likely <grant.likely-s3s/[email protected]>Cc J. Bruce Fields <[email protected]>Cc Neil Brown <[email protected]>Cc Trond Myklebust <[email protected]>Cc David S. Miller <davem-fT/PcQaiUtIeIZ0/[email protected]>Cc Benny Halevy <[email protected]>Cc Chuck Lever <[email protected]>Cc Ricardo Labiaga <[email protected]>---
arch/powerpc/mm/numa.c +3
-3@@ -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;include/linux/nodemask.h +0
-11@@ -69,8 +69,6 @@* int node_online(node) Is some node online? * int node_possible(node) Is some node possible? * -* int any_online_node(mask) First online node in mask -* * node_set_online(node) set bit 'node' in node_online_map * node_set_offline(node) clear bit 'node' in node_online_map * @@ -467,15 +465,6 @@ static inline int num_node_state(enum node_states state)#define node_online_map node_states[N_ONLINE]#define node_possible_map node_states[N_POSSIBLE] -#define any_online_node (mask) \ -({ \ - int node; \ - for_each_node_mask(node, (mask)) \ - if (node_online(node)) \ - break; \ - node; \ -}) -#define num_online_nodes () num_node_state(N_ONLINE)#define num_possible_nodes () num_node_state(N_POSSIBLE)#define node_online (node) node_state((node), N_ONLINE)net/sunrpc/svc.c +1
-2@@ -133,7 +133,7 @@ svc_pool_map_choose_mode(void)return SVC_POOL_PERNODE ; } - node =any_online_node (node_online_map); + node = first_online_node;if (nr_cpus_node (node) >2 ) {/* * Non-trivial SMP, or CONFIG_NUMA on --
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 20 lines · H Hartley Sweeten
nodmask.h: remove macroany_online_nodeThe macro
any_online_nodeis 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 eitherNODE_MASK_ALLornode_online_map) just use thefirst_online_nodemacro and remove theany_online_nodemacro since there are no users.Signed-off-by H Hartley Sweeten <[email protected]>Cc Andrew Morton <akpm-de/[email protected]>Cc David Rientjes <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Cc Lee Schermerhorn <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Dave Hansen <[email protected]>Cc Milton Miller <miltonm-ogEGBHC/[email protected]>Cc Nathan Fontenot <[email protected]>Cc Geoff Levand <[email protected]>
Quoted 8 lines
Cc Grant Likely <grant.likely-s3s/[email protected]>Cc J. Bruce Fields <[email protected]>Cc Neil Brown <[email protected]>Cc Trond Myklebust <[email protected]>Cc David S. Miller <davem-fT/PcQaiUtIeIZ0/[email protected]>Cc Benny Halevy <[email protected]>Cc Chuck Lever <[email protected]>Cc Ricardo Labiaga <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · H Hartley Sweeten
nodmask.h: remove macroany_online_nodeThe macro
any_online_nodeis 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 eitherNODE_MASK_ALLornode_online_map) just use thefirst_online_nodemacro and remove theany_online_nodemacro since there are no users.
Quoted 6 lines
Signed-off-by H Hartley Sweeten <[email protected]>Cc Andrew Morton <akpm-de/[email protected]>Cc David Rientjes <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Cc Lee Schermerhorn <[email protected]>
Quoted 5 lines
Cc Paul Mackerras <[email protected]>Cc Dave Hansen <[email protected]>Cc Milton Miller <miltonm-ogEGBHC/[email protected]>Cc Nathan Fontenot <[email protected]>Cc Geoff Levand <[email protected]>
Quoted 8 lines
Cc Grant Likely <grant.likely-s3s/[email protected]>Cc J. Bruce Fields <[email protected]>Cc Neil Brown <[email protected]>Cc Trond Myklebust <[email protected]>Cc David S. Miller <davem-fT/PcQaiUtIeIZ0/[email protected]>Cc Benny Halevy <[email protected]>Cc Chuck Lever <[email protected]>Cc Ricardo Labiaga <[email protected]>
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html