linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] arm64/mm: Drop redundant addr increment in set_huge_pte_at()
@ 2025-07-16  3:54 Anshuman Khandual
  2025-07-17 10:46 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: Anshuman Khandual @ 2025-07-16  3:54 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Anshuman Khandual, Catalin Marinas, Will Deacon, Ryan Roberts,
	linux-kernel, Dev Jain

The 'addr' need not be incremented in the loop because that is not going to
be used subsequently.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Dev Jain <dev.jain@arm.com> 
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
Changes in V2:

- Updated the commit message

 arch/arm64/mm/hugetlbpage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
index 0c8737f4f2ce..1d90a7e75333 100644
--- a/arch/arm64/mm/hugetlbpage.c
+++ b/arch/arm64/mm/hugetlbpage.c
@@ -225,7 +225,7 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
 	ncontig = num_contig_ptes(sz, &pgsize);
 
 	if (!pte_present(pte)) {
-		for (i = 0; i < ncontig; i++, ptep++, addr += pgsize)
+		for (i = 0; i < ncontig; i++, ptep++)
 			__set_ptes_anysz(mm, ptep, pte, 1, pgsize);
 		return;
 	}
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2] arm64/mm: Drop redundant addr increment in set_huge_pte_at()
  2025-07-16  3:54 [PATCH V2] arm64/mm: Drop redundant addr increment in set_huge_pte_at() Anshuman Khandual
@ 2025-07-17 10:46 ` Will Deacon
  0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2025-07-17 10:46 UTC (permalink / raw)
  To: linux-arm-kernel, Anshuman Khandual
  Cc: catalin.marinas, kernel-team, Will Deacon, Ryan Roberts,
	linux-kernel, Dev Jain

On Wed, 16 Jul 2025 04:54:32 +0100, Anshuman Khandual wrote:
> The 'addr' need not be incremented in the loop because that is not going to
> be used subsequently.
> 
> 

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64/mm: Drop redundant addr increment in set_huge_pte_at()
      https://git.kernel.org/arm64/c/aa46e18836c0

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-17 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16  3:54 [PATCH V2] arm64/mm: Drop redundant addr increment in set_huge_pte_at() Anshuman Khandual
2025-07-17 10:46 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).