Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3871165ybn; Fri, 27 Sep 2019 12:34:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqza7MX2tgGdLWAoBzH49UsyhFefK/i0F6ZB/+AzaCiKf4ekqrY2m1gWDFcgJz2hinGKyusb X-Received: by 2002:aa7:dc55:: with SMTP id g21mr6429561edu.210.1569612882572; Fri, 27 Sep 2019 12:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569612882; cv=none; d=google.com; s=arc-20160816; b=HVGE7s9R6aAYNmgdfwXF/4Fs0nliWwy8xWccj7HDnYCDj6d7I4MGwfMW4bKyxarAC7 aoaYC336ltTJPN1vt3Wt5RqHA9zbM/pVBxwdsfhEwesfFts5kDaBI3r5ZIPByxa9K62N vBeb9ymIdoDXqX0y/MFhzEeV+xdLYMFBrkwQBOOZ3+LHqVWkn3qqLzmS4y3QIM3u+Kpx Nt1rcTdTCFrcVbTwslrVvKvggGu67wxHSAeKrPvO6zsDtV0vVs3BnyCahDVJFebHmOAu fTiHuMfS4viQZO/g+iKGfqntfxqRDQ2xblq0ThRTPfxAcTrKHhO+rbefay5QJgGsAVBZ dx5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=isDPGCReaiK37P8mK6pZ6yGM/s1VY4mHCre4SI/h+uk=; b=eJqzVLCAwPJufSQS3XaeDku4IxW/FHWI8fo/rNq/PJozNrKrkZPZl8NrSEHsAni7kC 14vXj4my7cyQ0+lm0/Pa4Qc/4yz/wEEkS1rMxtMPa4leBBTvmePnFTxDEZH8FXH2SEzW j2+gxTVNHjK6CHUE5b7HEUo/LM/Y1sIdrhSSpSd6SgudTxEfuAiYxu0gyaF0/y9hZXoY EIH8Z9TOIFqU/EXGFTZTNOQK9cElAqd0cSxm1GNtvDRbAqwzHCQGF1FKGQIvjMtOCo77 AVAKtNwHCRsxZ769ctrwqxuhpD4drQT00pYPvOl+x3zgK/laj97J9r8EsSAE4XylwCKT xicg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=qDzk9fny; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si2126405edv.182.2019.09.27.12.34.16; Fri, 27 Sep 2019 12:34:42 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=qDzk9fny; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725980AbfI0TdG (ORCPT + 99 others); Fri, 27 Sep 2019 15:33:06 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:39600 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbfI0TdG (ORCPT ); Fri, 27 Sep 2019 15:33:06 -0400 Received: by mail-oi1-f193.google.com with SMTP id w144so6179171oia.6 for ; Fri, 27 Sep 2019 12:33:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=isDPGCReaiK37P8mK6pZ6yGM/s1VY4mHCre4SI/h+uk=; b=qDzk9fny20uBp5VR9KMYd1Fac7VhmA3xZ0QbUkwiP80EbKY9RaCkA/4U4Qe7pi6TsI zDEsEtbKHF8GpyEsQPTtGod2U4zBxqctjrd4sOKYfMmeJXF6SAxWVZ16/wp4AKGS5xv6 3apcUl+LXf1XdM/yu/zw1Uw97EfZ9XGnzwGMCbc919wDt95/CpOPUnrVC9TbFVA3DgnX k826ZjdZJgOP0qVA9oleHpg4fFUebyz8hqjPBGPaHvhd7R/id1utbwGeNqZuwRQdicVO zyrcK+uCKeiCSFtqsitZuUVl82lvIty2M8HzrYh0u6W2pvLlVz29fB2DhcjV0n04fay/ 2OoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=isDPGCReaiK37P8mK6pZ6yGM/s1VY4mHCre4SI/h+uk=; b=trDCr9RTDLDv167ztRDrClLtHN0t/TA3GtKv9e4f095RoBR9Q/xthM8ydMXXsMVkcJ ZdoUcCQP3ynNaRG8k1TKx4D+Aubyw1YAhp0kXxB8DU5D/7lOTS+dGJHYLblad2aOLUex F9+DRa3z++3DOFqtFVcVc4alrMlkaz95mZmrbpzbz/fAanboVZazEotPAjdzljYb4l6d RwwbP0mu1NI13xQXVHLWQbDMaIbgLX42JkkaN3yf7jHb+xtRR1m/Oa54Vm2qySh7UYSy 7D4B8SFtyXRBPUGe+xmau6ihEaH5Krw/8U3nTs36PtQZPnjxl5+a005uaJO+1XScvF6I Yy1g== X-Gm-Message-State: APjAAAUjMEauU91DWBXY2s+shCf6fnxS8istUoo9JBVAnu+lYoA1nfK4 DXoGFHzQTkr9mInzb4zJnCuOOha1EMpyAGusk/7d0A== X-Received: by 2002:aca:eb09:: with SMTP id j9mr8863477oih.105.1569612785882; Fri, 27 Sep 2019 12:33:05 -0700 (PDT) MIME-Version: 1.0 References: <20190927161416.62293-1-pilgrimtao@gmail.com> In-Reply-To: <20190927161416.62293-1-pilgrimtao@gmail.com> From: Dan Williams Date: Fri, 27 Sep 2019 12:32:54 -0700 Message-ID: Subject: Re: [PATCH] mm, page_alloc: drop pointless static qualifier in build_zonelists() To: Kaitao Cheng Cc: Andrew Morton , Sasha Levin , Michal Hocko , Oscar Salvador , Mel Gorman , Mike Rapoport , Alexander Duyck , Pasha Tatashin , Alexander Potapenko , Linux MM , Linux Kernel Mailing List , Muchun Song Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 27, 2019 at 9:14 AM Kaitao Cheng wrote: > > There is no need to make the 'node_order' variable static > since new value always be assigned before use it. > > Signed-off-by: Kaitao Cheng > Signed-off-by: Muchun Song > --- > mm/page_alloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 3334a769eb91..c473c304d09f 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -5597,7 +5597,7 @@ static void build_thisnode_zonelists(pg_data_t *pgdat) > > static void build_zonelists(pg_data_t *pgdat) > { > - static int node_order[MAX_NUMNODES]; > + int node_order[MAX_NUMNODES]; This isn't pointless. This prevents 4KB stack allocation which might overflow.