[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v3 03/10] xen/nodemask: Drop any_online_node() and first_unset_node()



These have never been used in Xen, and it is unlikely that they would be
useful in the future.

any_online_cpu() was dropped by c/s 22bdce1c048 "eliminate first_cpu() etc"
but the API comment was left in place.  Drop that too.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Julien Grall <julien.grall@xxxxxxx>
CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>

v3:
 * New
---
 xen/include/xen/cpumask.h  |  2 --
 xen/include/xen/nodemask.h | 20 --------------------
 2 files changed, 22 deletions(-)

diff --git a/xen/include/xen/cpumask.h b/xen/include/xen/cpumask.h
index 6be9567e9e..9448f5c6f8 100644
--- a/xen/include/xen/cpumask.h
+++ b/xen/include/xen/cpumask.h
@@ -50,8 +50,6 @@
  * int cpu_possible(cpu)               Is some cpu possible?
  * int cpu_present(cpu)                        Is some cpu present (can 
schedule)?
  *
- * int any_online_cpu(mask)            First online cpu in mask, or NR_CPUS
- *
  * for_each_possible_cpu(cpu)          for-loop cpu over cpu_possible_map
  * for_each_online_cpu(cpu)            for-loop cpu over cpu_online_map
  * for_each_present_cpu(cpu)           for-loop cpu over cpu_present_map
diff --git a/xen/include/xen/nodemask.h b/xen/include/xen/nodemask.h
index 5eebc2c5ee..c28dd3c768 100644
--- a/xen/include/xen/nodemask.h
+++ b/xen/include/xen/nodemask.h
@@ -33,8 +33,6 @@
  * int first_node(mask)                        Number lowest set bit, or 
MAX_NUMNODES
  * int next_node(node, mask)           Next node past 'node', or MAX_NUMNODES
  * int last_node(mask)                 Number highest set bit, or MAX_NUMNODES
- * int first_unset_node(mask)          First node not set in mask, or 
- *                                     MAX_NUMNODES.
  * int cycle_node(node, mask)          Next node cycling from 'node', or
  *                                     MAX_NUMNODES
  *
@@ -49,8 +47,6 @@
  *
  * int node_online(node)               Is some node online?
  *
- * 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
  *
@@ -224,13 +220,6 @@ static inline int __last_node(const nodemask_t *srcp, int 
nbits)
        m;                                                              \
 })
 
-#define first_unset_node(mask) __first_unset_node(&(mask))
-static inline int __first_unset_node(const nodemask_t *maskp)
-{
-       return min_t(int,MAX_NUMNODES,
-                       find_first_zero_bit(maskp->bits, MAX_NUMNODES));
-}
-
 #define cycle_node(n, src) __cycle_node((n), &(src), MAX_NUMNODES)
 static inline int __cycle_node(int n, const nodemask_t *maskp, int nbits)
 {
@@ -293,15 +282,6 @@ extern nodemask_t node_online_map;
 #define node_online(node)      ((node) == 0)
 #endif
 
-#define any_online_node(mask)                  \
-({                                             \
-       int node;                               \
-       for_each_node_mask(node, (mask))        \
-               if (node_online(node))          \
-                       break;                  \
-       node;                                   \
-})
-
 #define node_set_online(node)     set_bit((node), node_online_map.bits)
 #define node_set_offline(node)    clear_bit((node), node_online_map.bits)
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.