From: David Hildenbrand <david@redhat.com>
To: Dev Jain <dev.jain@arm.com>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Cc: ryan.roberts@arm.com, willy@infradead.org
Subject: Re: [PATCH] mm: Remove redundant return in set_huge_zero_folio()
Date: Thu, 6 Mar 2025 16:34:22 +0100 [thread overview]
Message-ID: <0983d2b3-aee9-4432-b993-5617a5df0b06@redhat.com> (raw)
In-Reply-To: <20250306144315.21907-1-dev.jain@arm.com>
On 06.03.25 15:43, Dev Jain wrote:
> It is the responsibility of the caller to check pmd_none(); in any case,
> we are not achieving anything by returning since there is no return value
> to tell the caller that we succeeded or not. So remove this check.
>
> Signed-off-by: Dev Jain <dev.jain@arm.com>
> ---
> mm/huge_memory.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 3d3ebdc002d5..f64212d674fd 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -1309,8 +1309,6 @@ static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm,
> struct folio *zero_folio)
> {
> pmd_t entry;
> - if (!pmd_none(*pmd))
> - return;
> entry = mk_pmd(&zero_folio->page, vma->vm_page_prot);
> entry = pmd_mkhuge(entry);
> pgtable_trans_huge_deposit(mm, pmd, pgtable);
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2025-03-06 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 14:43 Dev Jain
2025-03-06 15:34 ` David Hildenbrand [this message]
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=0983d2b3-aee9-4432-b993-5617a5df0b06@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dev.jain@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryan.roberts@arm.com \
--cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox