Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2883048ybb; Mon, 30 Mar 2020 15:11:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv6qZ6mKGOgy87ygMyAcC+0dEJLHic/Upt+L5VeQYZZ1pEJC5n3LygAEPmJINqzQ20xeDJy X-Received: by 2002:aca:4710:: with SMTP id u16mr174400oia.108.1585606288128; Mon, 30 Mar 2020 15:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585606288; cv=none; d=google.com; s=arc-20160816; b=FuMJynqc5zn/bakG+yYBEhPDfVCM5adIE7cHUvd9g6vOTI2CYk8qWUw/MkKHs63VG8 V0XkMOnCm/J1Gr395N2R0K7C4a+qJSIjrZCQyLRzvVji0Jxeq8DyV4pvvMaiymVzwDVF eklEsMV9HwXLutIZ5ErH5eonUQ/NoGdWb5INsi8RAS/jHCtkKeel2qWqte6DCTTrNKmt BUSJ0pw0MYrtHVQsowh3XmmUWm9sv1aYa08Qysa6EtHP7OSkq2lEG+k8TFqVUBaGYDU1 UDOcivHo4DIMQlWlLVFlrzXiSlTDYEEavVBPXzgrOzWn2rW34ED1xEAy3vMqRosvPwxi SrFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=ik/3e0uSzSzcYKdS0/OeT2EBEqYErrSILcGFWXs+2RM=; b=DhAsRyCnFu0cALI9HISV26BwlH8s2IXsCZ7Vu6kbQUob5vr1Oekymi33brWf+w0yZo d1S/4oUkRXjkIp21fAHnD2wfYS2M0FNdek+7l6wh7DrBSM60Rp+Tb9Bunpt4OY1Smkn5 trCWVrhtoRhsr3lSSeiNd5RRAXM7TNXR9rJceXb8fzzwuatHF5/vbsoPu5BNIrXOr6zN 2TBodBVItwomnLT6Ox14qhcXo0t6r9i5GeS4J+07Z5w+vu0iKy1kDHuAiu1SM4QXgXBH 6245gXZ/VjU4h3eb5xdEC0mpLiir60t/vIlpT2tiAVgO59uFAGasUpS5NsxqVz7B78Rn XRcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UKf24TUL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si6438045otk.220.2020.03.30.15.11.14; Mon, 30 Mar 2020 15:11:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UKf24TUL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729577AbgC3WJL (ORCPT + 99 others); Mon, 30 Mar 2020 18:09:11 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55312 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729142AbgC3WJL (ORCPT ); Mon, 30 Mar 2020 18:09:11 -0400 Received: by mail-wm1-f68.google.com with SMTP id r16so466864wmg.5 for ; Mon, 30 Mar 2020 15:09:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ik/3e0uSzSzcYKdS0/OeT2EBEqYErrSILcGFWXs+2RM=; b=UKf24TULpgTKJkpnnCkZEN2gEFN63tvYWD6w41Q4gya0Vq0f09iToO7bl/oB1ZNu1I +0yED3dPm+FJXmb22sY74RrD/wLrvk+TzOh++9pEq937ku5LKzlLKLbIC1/cLmRF9JGh LGS1Q7OfD8Ne+svufwH86ipe5b3qGXcIjpyKxe+GsXMLC/l9e5NpHtvCVj2HEwh1AjEo JAG0gCIGwsXq0TB69oyMticmrZiArh9E+JW7jV3U38k6sZSiwUyQi6xL6HuUspFxjE1o wB+Tl/94HobSZdFyXYLMNZLq5Tr+4Z+GIfvh8MhzsAx7n8rQ6loCcmHgebUg1ZoBGPCo PUJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ik/3e0uSzSzcYKdS0/OeT2EBEqYErrSILcGFWXs+2RM=; b=fxWZUZ2ugIyJsXaNLeZUnbOdhlhQ8y0FXG/trpYALo5hSHFNcP9D5iDRzNJVKLLQJc eh33cp4iFPejeiqBLlSmbMTnOOmPviD3bizAFAaCLu5vxOjA++468Cp8qt0JPFgvO/xn YLvSuLULA3/OK18z4MO4EjAnrlIHc11yLCNpWQk81ZYLOv4Uz3w/0F71VTx3P9RAWkaE mKJm63B3Iw/a5eqT+gML9ndJMyCIAYIAi+ZVQIeoxaemHrfdVTjjYDLWT1sz7baqE5AY xTAU6r8sdnRbTelY/QHzCw3eBIHUInTQRYXBkKe80CXclwm2VmwhjjFm65C722zr/RgG KHKg== X-Gm-Message-State: ANhLgQ2liy7Hh3GPjHOmyP1i39BH0t3pxaJ5k3GvB+rXoi7gwCkhoZye sTQzXfW/a+F9Q7tc3AZavGo= X-Received: by 2002:a7b:c308:: with SMTP id k8mr251708wmj.40.1585606149273; Mon, 30 Mar 2020 15:09:09 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id i8sm25093845wrb.41.2020.03.30.15.09.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Mar 2020 15:09:08 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, jgg@ziepe.ca, david@redhat.com, jhubbard@nvidia.com, bhe@redhat.com, Wei Yang Subject: [Patch v4] mm/page_alloc.c: use NODE_MASK_NONE in build_zonelists() Date: Mon, 30 Mar 2020 22:08:40 +0000 Message-Id: <20200330220840.21228-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand --- v4: adjust subject/description as suggested by John Hubbard v3: adjust the commit log a little v2: use NODE_MASK_NONE as suggested by David Hildenbrand --- mm/page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ef790dfad6aa..dfcf2682ed40 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5587,14 +5587,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) { -- 2.23.0