From patchwork Thu Aug 3 11:49:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 130568 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1127461vqx; Thu, 3 Aug 2023 05:58:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlEptO0mG0RPqwH2AbZZjX9B8QTMMtHRC9P3EujSKNHPV7nwVzCFfEqsLKNv+g+xwI9+Qux5 X-Received: by 2002:a2e:b703:0:b0:2b6:eb5a:d377 with SMTP id j3-20020a2eb703000000b002b6eb5ad377mr7657988ljo.5.1691067483392; Thu, 03 Aug 2023 05:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691067483; cv=none; d=google.com; s=arc-20160816; b=sDzutgiYDiHGUsnlTnAVDVVO/TYeKH/OtrK54n6BaapFsCf1SHuYJp913Wfl0QRnOu eT7/ewj1tNVecRxv4f+GPdP6Z2XOZ0wyf8XKTFfViU+FYSP/0dx1RSRDb8RhSpCnyRrR 1CPViavPet7TMsCUZG71tehQHM6m/jCtj0fcOnAdJHp3DD/VPK0jeAgET6wq8L0qHf6+ kIdyAdj19cjFdcPII/ZnQ4oFaqBrCRx9/nE95nyY2E1B5mkGsEAjjpM/VAZteQWNUeBA dOI/BDB5hAID03LIf5UbB6Anr5TWe136HJpL1U4InOCAX8+32qxwP1bRi12HiYGetiyY BnvQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p8-20020a170906228800b00992b32e3e3esi11322938eja.468.2023.08.03.05.57.40; Thu, 03 Aug 2023 05:58:03 -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 S234730AbjHCLt6 (ORCPT + 99 others); Thu, 3 Aug 2023 07:49:58 -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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773212777291096749 X-GMAIL-MSGID: 1773212777291096749 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 Reviewed-by: David Hildenbrand --- 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)