The patch titled Subject: mm: remove unused stub for can_swapin_thp() has been added to the -mm mm-hotfixes-unstable branch. Its filename is mm-remove-unused-stub-for-can_swapin_thp.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-remove-unused-stub-for-can_swapin_thp.patch This patch will later appear in the mm-hotfixes-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Subject: mm: remove unused stub for can_swapin_thp() Date: Tue, 8 Oct 2024 22:13:29 +0300 When can_swapin_thp() is unused, it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: mm/memory.c:4184:20: error: unused function 'can_swapin_thp' [-Werror,-Wunused-function] Fix this by removing the unused stub. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Link: https://lkml.kernel.org/r/20241008191329.2332346-1-andriy.shevchenko@xxxxxxxxxxxxxxx Fixes: 242d12c98174 ("mm: support large folios swap-in for sync io devices") Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Acked-by: Barry Song <baohua@xxxxxxxxxx> Cc: Bill Wendling <morbo@xxxxxxxxxx> Cc: Chuanhua Han <hanchuanhua@xxxxxxxx> Cc: Justin Stitt <justinstitt@xxxxxxxxxx> Cc: Nathan Chancellor <nathan@xxxxxxxxxx> Cc: Nick Desaulniers <ndesaulniers@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory.c | 5 ----- 1 file changed, 5 deletions(-) --- a/mm/memory.c~mm-remove-unused-stub-for-can_swapin_thp +++ a/mm/memory.c @@ -4181,11 +4181,6 @@ fallback: return __alloc_swap_folio(vmf); } #else /* !CONFIG_TRANSPARENT_HUGEPAGE */ -static inline bool can_swapin_thp(struct vm_fault *vmf, pte_t *ptep, int nr_pages) -{ - return false; -} - static struct folio *alloc_swap_folio(struct vm_fault *vmf) { return __alloc_swap_folio(vmf); _ Patches currently in -mm which might be from andriy.shevchenko@xxxxxxxxxxxxxxx are mm-remove-unused-stub-for-can_swapin_thp.patch resource-replace-open-coded-resource_intersection.patch resource-introduce-is_type_match-helper-and-use-it.patch