Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2115748rwo; Thu, 3 Aug 2023 05:05:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlHGmZoBZ7odwzPCGlwMhIuJKDXm7s8E0YPCoHNVRE7wI4QztHljuiJjPcGrbEqwyQ29xhJ7 X-Received: by 2002:a05:6a00:b8a:b0:687:494c:2ebf with SMTP id g10-20020a056a000b8a00b00687494c2ebfmr12688453pfj.7.1691064356166; Thu, 03 Aug 2023 05:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691064356; cv=none; d=google.com; s=arc-20160816; b=Z7FUQWjV8gloEuaAY7VMv1p9ym2xDWf3XnmH6BFvENvmZBQ+70hKYqezDKjXk8IxZg 0ZUOzrobbo/46oPe1LQ2bmA1Nhj4puX+5ewoQGkCiKhiv6hvI6MSpiLgEDTPGxktjPoA AsefNOhG+Yr97IJlY5nRMaWLbRcpEf2Z6GnCzfQ6YQygWl63LZFIrcgOtIGEi0S2gIV2 KbCKupp/jztcI1cdXrijosen2xZdDdr6VzKUmpEf6khsCIxkF8tecaiupK0IEsf8y2vb 7H/8THpQh2tFrgcAtDnQ4ykNlMs0B4/srnugzaIB738N3sG+aTG3k8BNCn3BnvosJt+q jXKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=H0J1hzVk7xqBlQlXhIw/mJ2fyeAXrb/exTAPep/w5i4=; fh=Mo/Lcs6WtjcRq1QaiJBjtYwS/87p5PpqCapK5ULE+Ko=; b=hU8lPSSlqEmAez32NoDnSZnT+0l05k8clZHDYrJFfKgltczxrEg3JMnipKGu3JOhn/ RLDvfD7qTuvLttTssCAHsnDwjTtpdcCptLuVxw02AYucr5Mm9PQNPVMRCHCkoRK/M0DY d4iIpoPXHAT1a/GNQ1CUiJFTuBVSClA6uZCXJcwLc6O38T7fhiZ9niaPb2o+Y1qM+q9p HGQ7n9F8h8HgTXHT1NOKgJydes4kMZqjKkSt2J0spcN6mYN61XY0nze+zm6X9T3Vv4dK EbH4uVGSe+frsALQApDHmlm6SQECOkGk8riK4QITdsFffo4vVA4kUgqg26ztzZqeOnSq Am5w== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h26-20020a63531a000000b0055bc27f07aesi1907491pgb.480.2023.08.03.05.05.39; Thu, 03 Aug 2023 05:05:56 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233823AbjHCLt5 (ORCPT + 99 others); Thu, 3 Aug 2023 07:49:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbjHCLtz (ORCPT ); Thu, 3 Aug 2023 07:49:55 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E46F2737 for ; Thu, 3 Aug 2023 04:49:53 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RGnDZ08hszrS7N; Thu, 3 Aug 2023 19:48:46 +0800 (CST) Received: from huawei.com (10.174.151.185) 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.2507.27; Thu, 3 Aug 2023 19:49:49 +0800 From: Miaohe Lin To: CC: , , Subject: [PATCH] mm/page_alloc: remove unneeded variable base Date: Thu, 3 Aug 2023 19:49:34 +0800 Message-ID: <20230803114934.693989-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,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 Since commit 5d0a661d808f ("mm/page_alloc: use only one PCP list for THP-sized allocations"), local variable base is just as same as order. So remove it. No functional change intended. Signed-off-by: Miaohe Lin --- mm/page_alloc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d7a357cb21ee..96b7c1a7d1f2 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -538,8 +538,6 @@ static void bad_page(struct page *page, const char *reason) static inline unsigned int order_to_pindex(int migratetype, int order) { - int base = order; - #ifdef CONFIG_TRANSPARENT_HUGEPAGE if (order > PAGE_ALLOC_COSTLY_ORDER) { VM_BUG_ON(order != pageblock_order); @@ -549,7 +547,7 @@ static inline unsigned int order_to_pindex(int migratetype, int order) VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER); #endif - return (MIGRATE_PCPTYPES * base) + migratetype; + return (MIGRATE_PCPTYPES * order) + migratetype; } static inline int pindex_to_order(unsigned int pindex) -- 2.33.0