Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6298317rwn; Tue, 13 Sep 2022 01:59:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR4a7Fvx4sVLDui5kFbl5QJ9gktNqR5atIHnANvySHUWnOnW+ATGjRFef8686QrC/vGoy9HO X-Received: by 2002:a17:90a:640c:b0:1f7:6ecf:33b6 with SMTP id g12-20020a17090a640c00b001f76ecf33b6mr2867428pjj.3.1663059594579; Tue, 13 Sep 2022 01:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663059594; cv=none; d=google.com; s=arc-20160816; b=zNNsue4gsdNAsPPFTb+XK7ZmyHqDfUWOSyJ2JrO2t6UDnoA1ulZUWnZO/Hgay6UanZ DrT2T9cJfsxIHT8mS9UV8BSiDMSAmZjGLrLbyxdSraioqhz8Uw/1UnazKvJrES8miBsq c8rzT7LoaM8iexDfVuw4vQxbsO/JUwzPDNoBTL1lzpo+U3WhkHqFQ9B7m/349QHvOl6I yxUF+zTLtBy8cdh4pSRs0xwu/PS3jQvu9OpkAw0PHbzrVCN3IU9NsOAvAWmbL1J+j3np r5ftAcW7r/n87zOX82fwg+qpBHuS0HwMhOb7rg+0KmWmE69QTBPNp1J5bFMkI2/HTqKY J+BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=dkxtTACig3v6l6nvMm62nTWgQ5ZsLq+EMYS+DBQbM00=; b=Y/68FR5Q6wk8Xw201V5VszLsi2wfsBfppn8l8U+nF4Bi4F/KScUuhC/sXrv7AK/KwK 0nH30Zwy0+NwiiOu/gr3JgGeaOVdBYxEw0wA/AMRdxIvLfv/IA3+hjj1yvLJ0TyZytBn pcbtewvODZzqisIjskXqnliJet45jSvrcA/S7DMQqlzsOxPDzb+7JSZI9A6aZ3PXKFuG 8x8na7+nvF+qP+5+9lz21H/Wf0z7Cq9RbnCSIYA0rBarPyFCyYnfzLluNv4XegLniEbs gJzjgRAM0fmcAnRPGfWsS7ANvT1CP9PbOhk/OgJKYdM6sUV3ady8sqy/xaC5QBm5s02F Sg6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k6-20020a170902760600b001783edea162si3289948pll.554.2022.09.13.01.59.43; Tue, 13 Sep 2022 01:59:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbiIMItj (ORCPT + 99 others); Tue, 13 Sep 2022 04:49:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231494AbiIMItS (ORCPT ); Tue, 13 Sep 2022 04:49:18 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E8BD65C945 for ; Tue, 13 Sep 2022 01:49:10 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7922EED1; Tue, 13 Sep 2022 01:49:16 -0700 (PDT) Received: from [10.162.42.9] (unknown [10.162.42.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E68CD3F73B; Tue, 13 Sep 2022 01:49:07 -0700 (PDT) Message-ID: Date: Tue, 13 Sep 2022 14:19:05 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 09/16] mm/page_alloc: use local variable zone_idx directly Content-Language: en-US To: Miaohe Lin , akpm@linux-foundation.org Cc: david@redhat.com, osalvador@suse.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220909092451.24883-1-linmiaohe@huawei.com> <20220909092451.24883-10-linmiaohe@huawei.com> From: Anshuman Khandual In-Reply-To: <20220909092451.24883-10-linmiaohe@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/9/22 14:54, Miaohe Lin wrote: > Use local variable zone_idx directly since it holds the exact value of > zone_idx(). No functional change intended. > > Signed-off-by: Miaohe Lin Reviewed-by: Anshuman Khandual > --- > 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 94baf33da865..3417232afa45 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -6878,7 +6878,7 @@ void __ref memmap_init_zone_device(struct zone *zone, > unsigned long start = jiffies; > int nid = pgdat->node_id; > > - if (WARN_ON_ONCE(!pgmap || zone_idx(zone) != ZONE_DEVICE)) > + if (WARN_ON_ONCE(!pgmap || zone_idx != ZONE_DEVICE)) > return; > > /*