[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/3] page-alloc: Rename the first_node local variable
first_node is the name of a local variable, and part of the nodemask API. The only reason this compiles is because the nodemask API is implemented as a macro rather than an inline function. It is confusing to read, and breaks when the nodemask API is cleaned up. Rename the local variable to just 'first' which is still clear in context. No functional change. 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: George Dunlap <george.dunlap@xxxxxxxxxxxxx> v2: * New --- xen/common/page_alloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 7825fd8c42..7bbb44f7d1 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -810,7 +810,7 @@ static struct page_info *get_free_buddy(unsigned int zone_lo, unsigned int order, unsigned int memflags, const struct domain *d) { - nodeid_t first_node, node = MEMF_get_node(memflags), req_node = node; + nodeid_t first, node = MEMF_get_node(memflags), req_node = node; nodemask_t nodemask = d ? d->node_affinity : node_online_map; unsigned int j, zone, nodemask_retry = 0; struct page_info *pg; @@ -832,7 +832,7 @@ static struct page_info *get_free_buddy(unsigned int zone_lo, ASSERT_UNREACHABLE(); return NULL; } - first_node = node; + first = node; /* * Start with requested node, but exhaust all node memory in requested @@ -878,19 +878,19 @@ static struct page_info *get_free_buddy(unsigned int zone_lo, { /* Very first node may be caller-specified and outside nodemask. */ ASSERT(!nodemask_retry); - first_node = node = first_node(nodemask); + first = node = first_node(nodemask); if ( node < MAX_NUMNODES ) continue; } else if ( (node = next_node(node, nodemask)) >= MAX_NUMNODES ) node = first_node(nodemask); - if ( node == first_node ) + if ( node == first ) { /* When we have tried all in nodemask, we fall back to others. */ if ( (memflags & MEMF_exact_node) || nodemask_retry++ ) return NULL; nodes_andnot(nodemask, node_online_map, nodemask); - first_node = node = first_node(nodemask); + first = node = first_node(nodemask); if ( node >= MAX_NUMNODES ) return NULL; } -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |