summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2023-08-03 14:49:34 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-08-21 23:37:38 +0300
commitc1dc69e6ce65d95e3d4d080868c3007f1a6fc4fe (patch)
tree3099121d7e48a2687036ac3e61267773db2799a4
parent73d4719363371afdcd63143c3532fa6a9443de13 (diff)
downloadlinux-c1dc69e6ce65d95e3d4d080868c3007f1a6fc4fe.tar.xz
mm/page_alloc: remove unneeded variable base
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. Link: https://lkml.kernel.org/r/20230803114934.693989-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/page_alloc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8b17dcbb925d..94f9e159a18d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -538,8 +538,6 @@ out:
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)