From nobody Sun Feb 8 13:28:05 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF83DC04A94 for ; Thu, 3 Aug 2023 11:49:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232486AbjHCLt6 (ORCPT ); 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 Content-Transfer-Encoding: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 *rea= son) =20 static inline unsigned int order_to_pindex(int migratetype, int order) { - int base =3D order; - #ifdef CONFIG_TRANSPARENT_HUGEPAGE if (order > PAGE_ALLOC_COSTLY_ORDER) { VM_BUG_ON(order !=3D pageblock_order); @@ -549,7 +547,7 @@ static inline unsigned int order_to_pindex(int migratet= ype, int order) VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER); #endif =20 - return (MIGRATE_PCPTYPES * base) + migratetype; + return (MIGRATE_PCPTYPES * order) + migratetype; } =20 static inline int pindex_to_order(unsigned int pindex) --=20 2.33.0