From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A21FFC6FA82 for ; Fri, 9 Sep 2022 09:25:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2EB828D000A; Fri, 9 Sep 2022 05:25:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2722D94000C; Fri, 9 Sep 2022 05:25:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 161218D000A; Fri, 9 Sep 2022 05:25:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id EE8CE94000C for ; Fri, 9 Sep 2022 05:25:32 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D2DA7C0B2A for ; Fri, 9 Sep 2022 09:25:32 +0000 (UTC) X-FDA: 79892014104.02.819608D Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf19.hostedemail.com (Postfix) with ESMTP id 551111A0064 for ; Fri, 9 Sep 2022 09:25:32 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MP9XN6KgCzHnpY; Fri, 9 Sep 2022 17:23:32 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 9 Sep 2022 17:25:29 +0800 From: Miaohe Lin To: CC: , , , , Subject: [PATCH 09/16] mm/page_alloc: use local variable zone_idx directly Date: Fri, 9 Sep 2022 17:24:44 +0800 Message-ID: <20220909092451.24883-10-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220909092451.24883-1-linmiaohe@huawei.com> References: <20220909092451.24883-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662715532; a=rsa-sha256; cv=none; b=UBgoVKDsEAO3GQLWfmSOSsWZX6s+T+Gkeg49hinxTW6iXnp+gr6tHqRNlSMXt8UR/ddqVM fh0zxSjD6NtVDBlnkRi6rD3iWm/EEFCHh9kySAF/nevCOhLLTlV94Mj7huD/7YiKbD3IMp 5ZAlQzlJEsIqNEhk5Gz+Fj553+tdVjA= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662715532; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YrO8dXy2fVaWQ4h00uJXekWpWlIwrOmxKZnSx6oDZ7I=; b=LKVyaPBJ0fptVIVFUW+BZEAlpZrGquBDA8zhaIsM3R+6EiO5nxncyLVer1jsHTIRK3pfsd DMKbBE/W3ItUbBp77r54Kce+UWhPnRLXnPblJpFq1zKfLBpF0wGnveILDdRpZXlNSCrwqm Sw+gVLd8SAqRhxHBOpFV0Xtoj7LfMxU= X-Stat-Signature: bi9xk3g65rzt13jgba4x741ya4fek87u X-Rspamd-Queue-Id: 551111A0064 X-Rspamd-Server: rspam11 X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-HE-Tag: 1662715532-406325 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Use local variable zone_idx directly since it holds the exact value of zone_idx(). No functional change intended. Signed-off-by: Miaohe Lin --- 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; /* -- 2.23.0