From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3BD99C433EF for ; Wed, 16 Feb 2022 12:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=f+InQMZPfQu+ex/KR/rnb6/6Fi4Hbx3JZb4fhqB3ZdA=; b=t6pMasqv6ZYmTT 75mwBaTZPCXMIcTzSeUIk7D/R/5gUDcNTGHINnRZ95yoAkv8+j1krUraO+qR1Xqqv+NWlkTuLJogI 0iYLtdCzgjfE3F/vLtXv86XZFbEpi6at9X6Uzqtg4AGFQXXZfeZKmsWdGOL3Aij/0Xh9HkM3sC1mx 9rAXTJ6xruVty4hmYzcrHV1iNHfjHh/t1bGO3UCov2OwooQI0ZKn10T/uWJnnanqpoTDvM2cP9BWU GzExrDmpdRYPdf0u21tNMV/C0V0oECGiEPz6cIQ7oHyQW1yveb87mBE7pAR9xf0veCzANUmYJaoWT Soe/Zk/GzCP6WpoANaMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKJSY-006wis-1H; Wed, 16 Feb 2022 12:31:02 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKJSS-006wgc-UZ for linux-arm-kernel@lists.infradead.org; Wed, 16 Feb 2022 12:30:59 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0F2ECB81EDB; Wed, 16 Feb 2022 12:30:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C45B0C004E1; Wed, 16 Feb 2022 12:30:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645014653; bh=J15CuNm3A0QK/OXN1iTasUMydcAQaIOZ7OaemvLX5Bc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ne94s/gsaPiCMbv5DQwUscJhiVuAcM/KmFdZZf6WtG3VUgRdF0JWrZMS2+jufdoba Gn0uJDnN9cf1UQB2jtt1io5jbLaUpo3lNT+1DGI8uNyfhYxm4hMUV2OPsdeqgdht2q QG78Q8qNsEZsmJYnlUsMGG0CJt4olmcHhrNuq5wn2Aa/BLY8GalzcQT0Yrc0I7A0F2 3NtN5OMOvO2u0AjsculrIq/1vcOkTEu4F4k+pjNl9MJ7irQv4EaBaW8j7itmxv6/xV /Djp1cnzGQluElrD+90N7+aYS2naxP0untcneobp53drfoPXyrdx93OjPBojMPm94C vjdXdGrbpUqvg== Date: Wed, 16 Feb 2022 12:30:48 +0000 From: Will Deacon To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] arm64/hugetlb: Define __hugetlb_valid_size() Message-ID: <20220216123048.GA9949@willie-the-truck> References: <1644491770-16108-1-git-send-email-anshuman.khandual@arm.com> <20220215164851.GD8458@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220216_043057_613120_1B81FCF4 X-CRM114-Status: GOOD ( 22.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 16, 2022 at 05:09:12AM +0530, Anshuman Khandual wrote: > > > On 2/15/22 10:18 PM, Will Deacon wrote: > > On Thu, Feb 10, 2022 at 04:46:10PM +0530, Anshuman Khandual wrote: > >> arch_hugetlb_valid_size() can be just factored out to create another helper > >> to be used in arch_hugetlb_migration_supported() as well. This just defines > >> __hugetlb_valid_size() for that purpose. > >> > >> Cc: Catalin Marinas > >> Cc: Will Deacon > >> Cc: linux-arm-kernel@lists.infradead.org > >> Cc: linux-kernel@vger.kernel.org > >> Signed-off-by: Anshuman Khandual > >> --- > >> This applies on v5.17-rc3 > >> > >> Changes in V2: > >> > >> - s/arm64_hugetlb_valid_size/__hugetlb_valid_size per Catalin > >> - Restored back warning in arch_hugetlb_migration_supported() per Catalin > >> - Updated the commit message subject line as required > >> > >> Changes in V1: > >> > >> https://lore.kernel.org/all/1644197468-26755-1-git-send-email-anshuman.khandual@arm.com/ > >> > >> arch/arm64/mm/hugetlbpage.c | 26 +++++++++++++------------- > >> 1 file changed, 13 insertions(+), 13 deletions(-) > >> > >> diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c > >> index ffb9c229610a..72ed07fe2c84 100644 > >> --- a/arch/arm64/mm/hugetlbpage.c > >> +++ b/arch/arm64/mm/hugetlbpage.c > >> @@ -56,24 +56,19 @@ void __init arm64_hugetlb_cma_reserve(void) > >> } > >> #endif /* CONFIG_CMA */ > >> > >> +static bool __hugetlb_valid_size(unsigned long size); > > > > Why not reorder the code to avoid this forward declaration? > > That will create more code churn, which I tried to avoid. Isn't it just moving a handful of lines further up in the file? What's the problem with that? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel