Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2268009rwo; Thu, 3 Aug 2023 07:10:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMKPgB0mCiIGNFWG0tILDXQDmmypLglCelH+TfFk6X1maH0+d6hbAXsIhpq8J5D1iO2xYX X-Received: by 2002:a05:6a00:1989:b0:682:f48a:7295 with SMTP id d9-20020a056a00198900b00682f48a7295mr19202812pfl.31.1691071811422; Thu, 03 Aug 2023 07:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691071811; cv=none; d=google.com; s=arc-20160816; b=LPMJtzyA/yjYLd/7tvyeXE8QBi6fSuwPfhrE1Fr2Gn+szPk+igXSTslFKNhzmI39rI xnirfIB9jJGRf0UMChs3lxAZabev2T2MoJ+57W0owB8NJ4O+oqMMHOfn55jhW51iK1WX pR/oQfrLtFhpFFKOqDBZrxHqXBzneGuIoeFajHH+FYpy4y3SoW+lyAPcHQcbkpD/Qqy9 u6Dg/5fjeall6MIq57wQiHqvrk2mzS95T0iNetzN3oLgXYn38YG4lVC8zl2n9nk2mHai 1qzrfZ3k1g9zWzbfJDNBak0FxKEvRNEcspn2i9Yn9pPw62qU0qu61sbn+zCAz8Kg185d fcmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=mWJpN+HPR5XbieLWrsaf/wc4LSMCej6l0uwrl1WLeOM=; fh=kbuZ4FEu4IxYMijCTgacfvKkxRHcgErLNlymViA9hRg=; b=Ciqf2IINsLeoDQ0h/0wAvCCEcAdUAdvRFMnUUn/bMqW9fc4vU4pyO5r9is7DgkxXSf R7GPDyddyvphATd3oj5kAWg+GYRQ371MqZLSxXDg/ndVaK0GqJ0ScGQs5DnsBWUkn3Bf nehBSuGrmF77DOeQxabgGLTFK3ZQjajMVjDOsVeMyNI/g2PaZfLlKarY3QZkdl/wz8Ex p1J7l87lOl75ro01h3Z3jcI2YSoZ/HfAyujM57Fi2ONV9L2UFfpRxYkI0feY+92B9aAp 63eFfkqRzIb2oWC2ewaRH0y+7iivSaAcXnOkOFn8YV22c2Sd/CMLnTtTX3AobJET3HKf t27w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EsqkwByx; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t191-20020a6381c8000000b00564ac0c6cebsi675996pgd.211.2023.08.03.07.09.59; Thu, 03 Aug 2023 07:10:11 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EsqkwByx; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236094AbjHCNNx (ORCPT + 99 others); Thu, 3 Aug 2023 09:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236231AbjHCNM4 (ORCPT ); Thu, 3 Aug 2023 09:12:56 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 000D22137 for ; Thu, 3 Aug 2023 06:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691068124; h=from:from: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:in-reply-to:references:references; bh=mWJpN+HPR5XbieLWrsaf/wc4LSMCej6l0uwrl1WLeOM=; b=EsqkwByxsUb5HesDmcRAgI8hUZ0Po/EmNR7nO6p82/Ztlt3JNi4VfDsFyguyT/f+GmkD/D UWH2XhcR1JhseFF1mdQF3Tbikhd4Ah/e4FIJlZF9c4KgdcIvnQXiVQpPoBXzxB1XLS34jz LOzEoVVlDxDWNPVoScOyk7qpn3wd/60= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-489-1T5IaR0UNuGzW8FcNDoC-Q-1; Thu, 03 Aug 2023 09:08:43 -0400 X-MC-Unique: 1T5IaR0UNuGzW8FcNDoC-Q-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-4fe32caefd8so910026e87.3 for ; Thu, 03 Aug 2023 06:08:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691068122; x=1691672922; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mWJpN+HPR5XbieLWrsaf/wc4LSMCej6l0uwrl1WLeOM=; b=jWuKHK6lvDknb8fcwkgASEO5xnqOHQnABY5ErURLdVfG+wMA//UO6VawZYL9mCQhY2 RYTJ20Ri+M3EcFgpvdNYP4xTjX0X7VYbvhwTP4kGD2rfLgioL4ur+Rjd/0na/mFI4SpL Tx8ViakL/P1vhkdQpIujJ621chu5GulW9sTTgS9OhlbMSFZmWu2Ku+c+pIO4XISvAzFH 03fuLXwgUWGRKLt8LLMeN9yujzxFnmUGew/bUH0KLTLRlJfWDmBpOTv9BRMA6M+Z1qeS hJMw9NlQor/hRwuTGYczsyymhuQ7ylxWDDjnAPZlDodSnZhFQ9Tb1CVpkVdbpWLPceD6 gssg== X-Gm-Message-State: ABy/qLZmcoZDfrn4ZYG+COQLkPyRRyHyMahikFzOM+JyiOhvuaGGJdVo bPmuWAO47SRicVgyYch0KGj8n0+vsKn15N8qIijniKbWD+9c0COoWtdrdJJR+QnoLBWhqyt60JU UPAX0f7WVCGGHaLr8VSth8G0n X-Received: by 2002:a19:6755:0:b0:4fd:f827:30b with SMTP id e21-20020a196755000000b004fdf827030bmr7342436lfj.52.1691068122190; Thu, 03 Aug 2023 06:08:42 -0700 (PDT) X-Received: by 2002:a19:6755:0:b0:4fd:f827:30b with SMTP id e21-20020a196755000000b004fdf827030bmr7342419lfj.52.1691068121772; Thu, 03 Aug 2023 06:08:41 -0700 (PDT) Received: from ?IPV6:2003:cb:c718:9a00:a5f5:5315:b9fa:64df? (p200300cbc7189a00a5f55315b9fa64df.dip0.t-ipconnect.de. [2003:cb:c718:9a00:a5f5:5315:b9fa:64df]) by smtp.gmail.com with ESMTPSA id l7-20020a1c7907000000b003fbb5506e54sm4194333wme.29.2023.08.03.06.08.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Aug 2023 06:08:41 -0700 (PDT) Message-ID: Date: Thu, 3 Aug 2023 15:08:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] mm/page_alloc: remove unneeded variable base Content-Language: en-US To: Miaohe Lin , akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20230803114934.693989-1-linmiaohe@huawei.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230803114934.693989-1-linmiaohe@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,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 On 03.08.23 13:49, Miaohe Lin wrote: > 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) Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb