From: Wei Yang Date: Wed, 3 Jun 2020 22:59:05 +0000 (-0700) Subject: mm/page_alloc.c: use NODE_MASK_NONE in build_zonelists() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d0ddf49b7c4a3161d28f58612672d08ee9b5db94;p=linux.git mm/page_alloc.c: use NODE_MASK_NONE in build_zonelists() Slightly simplify the code by initializing user_mask with NODE_MASK_NONE, instead of later calling nodes_clear(). This saves a line of code. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand Reviewed-by: Pankaj Gupta Link: http://lkml.kernel.org/r/20200330220840.21228-1-richard.weiyang@gmail.com Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5ef1eff330a2f..818c2644a2007 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5692,14 +5692,13 @@ static void build_zonelists(pg_data_t *pgdat) { static int node_order[MAX_NUMNODES]; int node, load, nr_nodes = 0; - nodemask_t used_mask; + nodemask_t used_mask = NODE_MASK_NONE; int local_node, prev_node; /* NUMA-aware ordering of nodes */ local_node = pgdat->node_id; load = nr_online_nodes; prev_node = local_node; - nodes_clear(used_mask); memset(node_order, 0, sizeof(node_order)); while ((node = find_next_best_node(local_node, &used_mask)) >= 0) {