All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] arm64/hugetlb: Define __hugetlb_valid_size()
Date: Wed, 16 Feb 2022 12:30:48 +0000	[thread overview]
Message-ID: <20220216123048.GA9949@willie-the-truck> (raw)
In-Reply-To: <e60802f2-dfb4-3824-9b85-7770c8fede96@arm.com>

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 <catalin.marinas@arm.com>
> >> Cc: Will Deacon <will@kernel.org>
> >> Cc: linux-arm-kernel@lists.infradead.org
> >> Cc: linux-kernel@vger.kernel.org
> >> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> >> ---
> >> 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

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] arm64/hugetlb: Define __hugetlb_valid_size()
Date: Wed, 16 Feb 2022 12:30:48 +0000	[thread overview]
Message-ID: <20220216123048.GA9949@willie-the-truck> (raw)
In-Reply-To: <e60802f2-dfb4-3824-9b85-7770c8fede96@arm.com>

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 <catalin.marinas@arm.com>
> >> Cc: Will Deacon <will@kernel.org>
> >> Cc: linux-arm-kernel@lists.infradead.org
> >> Cc: linux-kernel@vger.kernel.org
> >> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> >> ---
> >> 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

  reply	other threads:[~2022-02-16 12:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 11:16 [PATCH V2] arm64/hugetlb: Define __hugetlb_valid_size() Anshuman Khandual
2022-02-10 11:16 ` Anshuman Khandual
2022-02-10 11:22 ` Catalin Marinas
2022-02-10 11:22   ` Catalin Marinas
2022-02-15 16:48 ` Will Deacon
2022-02-15 16:48   ` Will Deacon
2022-02-15 23:39   ` Anshuman Khandual
2022-02-15 23:39     ` Anshuman Khandual
2022-02-16 12:30     ` Will Deacon [this message]
2022-02-16 12:30       ` Will Deacon
2022-02-17  4:17       ` Anshuman Khandual
2022-02-17  4:17         ` Anshuman Khandual

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220216123048.GA9949@willie-the-truck \
    --to=will@kernel.org \
    --cc=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.