Skip to contentSkip to conversation

mm-hmm-move-pmd_to_hmm_pfn_flags-to-the-respective-ifdeffery.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 20, 2025 Stable branch

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/hmm: move pmd_to_hmm_pfn_flags() to the respective #ifdeffery
has been removed from the -mm tree. Its filename was
mm-hmm-move-pmd_to_hmm_pfn_flags-to-the-respective-ifdeffery.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Andy Shevchenko <[email protected]>
Subject: mm/hmm: move pmd_to_hmm_pfn_flags() to the respective #ifdeffery
Date: Thu, 10 Jul 2025 11:23:53 +0300

When pmd_to_hmm_pfn_flags() is unused, it prevents kernel builds with clang, make W=1 and CONFIG_TRANSPARENT_HUGEPAGE=n:

mm/hmm.c:186:29: warning: unused function 'pmd_to_hmm_pfn_flags' [-Wunused-function]

Fix this by moving the function to the respective existing ifdeffery for its the only user.

See also:

6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build")

Fixes 992de9a8b751 ("mm/hmm: allow to mirror vma of a file on a DAX backed filesystem")
Cc Andriy Shevchenko <[email protected]>
Cc Bill Wendling <[email protected]>
Cc Jerome Glisse <[email protected]>
Cc Justin Stitt <[email protected]>
Cc Nathan Chancellor <[email protected]>

---

 mm/hmm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/hmm.c renamed from mm/hmm.c~mm-hmm-move-pmd_to_hmm_pfn_flags-to-the-respective-ifdeffery +1 -1
@@ -183,6 +183,7 @@ static inline unsigned long hmm_pfn_flag
 	return order << HMM_PFN_ORDER_SHIFT;
 }
 
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
 static inline unsigned long pmd_to_hmm_pfn_flags(struct hmm_range *range,
 						 pmd_t pmd)
 {
@@ -193,7 +194,6 @@ static inline unsigned long pmd_to_hmm_p
 	       hmm_pfn_flags_order(PMD_SHIFT - PAGE_SHIFT);
 }
 
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
 static int hmm_vma_handle_pmd(struct mm_walk *walk, unsigned long addr,
 			      unsigned long end, unsigned long hmm_pfns[],
 			      pmd_t pmd)

_

Patches currently in -mm which might be from [email protected] are