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: 13339872 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 3268BC04A6A for ; Thu, 3 Aug 2023 11:50:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 78D4E28023A; Thu, 3 Aug 2023 07:50:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 73DDC28022C; Thu, 3 Aug 2023 07:50:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 62FC828023A; Thu, 3 Aug 2023 07:50:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 5496928022C for ; Thu, 3 Aug 2023 07:50:00 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id EF3CB140161 for ; Thu, 3 Aug 2023 11:49:59 +0000 (UTC) X-FDA: 81082624518.30.0D5FF3E Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf25.hostedemail.com (Postfix) with ESMTP id ADAE6A000D for ; Thu, 3 Aug 2023 11:49:56 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf25.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691063397; a=rsa-sha256; cv=none; b=m3v/u7DgX93Drx0CHNBSxHettdT4qYlDRRuPdWmTyilwSeOp9Mb9/xGkcC2F08S0S8tz5q pnG+J0RbGdVDc7N2OLFkzS0MKoDZt4r47F3bthwDThSVhCh0eOpaFGKw3Lp+r8xjI16Vdi h96My5Vq+RDDUgIVa3qQ5Cz0YZJsffs= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf25.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691063397; 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: references; bh=H0J1hzVk7xqBlQlXhIw/mJ2fyeAXrb/exTAPep/w5i4=; b=0Oh1P6yRpbBTLOHR7UX9Not6VIc8+a5STMoxYKouE3EMC6a5qBDWD0wfkO+31ENPEhpQim zPiNh8Nb7xyclsIkAbGUIVP87fkasgnDgFZPcvroWDIqUnst4ZXAB4Pq9/oq/I0TjHOqzS WLVm2PIBMu1t1JPvNHrDCD6v7GN1Oo4= 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-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: ADAE6A000D X-Stat-Signature: 6s5ge5hbcm3b8db8o1mxzonq3d1wzw4u X-Rspam-User: X-HE-Tag: 1691063396-904575 X-HE-Meta: U2FsdGVkX1/7GlYA/j1h/uqRCZxDNbjcdKasKQmkTY6116CMjPtgWmDg7W7RmJizizE5/62IXTDQcNM5IP/0IUZfvpQBw+B79FiPpNB/8pb9VGmLiocWN/xDPwV7lvNEaYhgz1/m4wyR5YlD98oUTUrmgr6V65U3OZh6Tlv+/zIrltAIbE/tFw04oXv0bl39S1fq711Zhjy8W/+1xsYKP9r7SVRVySP8p56vSPbX0uDPO+w8Wcc1cRC2b7bMoVfx19pE6fdJjr+jeQHhiZsiDnP6z3XGtrf5jkL2dwXDtZfMKS/LSlp7PLYXPVyR3ChRUnfKqiZww13Y+DNaxwwfusHu6RLkqgADbafTQ117IybICso4EshI94U1szYFWZQIQ8d+pmactonBRhVXtgBrX3zGS6NWaGxRmLAkUCneDbzVSS+87bIZyEsqzF7gYrJv2h6OTNkgmTDXtO82nN9Tz20sAA3+YiOGobjfFHlw0EsAYj/U1MtiSe0yGVZFChYhe6cKaNmhhgO75Yj8FFPjAR9PoFd3m/V/IDQDAXHPKcbRpy2H6uDzVywdEUrA5ZfetokKIAiKEgQ84FaVngITX+Tmgz7Su7y419w716smI5F2SHvjQOYKX119yjEkC4K8cTmdmtHePUG+hZTZgvm3tBFtYFngn65Z1hKXAybA5qBYhUWnuRDWSEr4cg3uecgdbpqdUOywop5355CCzcJrftbxAQy5PIlLa+dHI8hx/8DunkzbEjTXxDGzGuPWW4XX2WwsOobnraex8V4RJwY6hfcDjLPwBV2GZU24RTWztYyuHpH1xGlRLGl510fPKBAxmXnj6ViL9C3VFBkwlYcqkOiUulO/g8NbVfWSwtw96YTrz5u18CgRuK5T3SbXuY9t+o5RchcPdUhawTGFiSg8WzhaDVH9lliq9/K3EF9agP66pl3ZOKrNaf7vLMckogxtarlr9jyIYUphcXPNbxh 9ebMuUhw D7VkiQUQsMitUSfYeUcahr1/eglkUV0Uat0snNtuNr/8C0d4mrLa3HmRWC+Iu7UheEBg8srJZbCOqIaIFzU7A9Jzjv5qJoPFAz0Ev9XL6Uh8WZSlZ8FTBZmwWD4oNNz6Y0eKx4UFXJh7VvBuK/Ic6Mnr2JSBDrbrdw+3kmBu3AXFkMIQOrS9cH0LX+65tYFp/6a0c 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: 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)