Skip to content

Commit a5e8eb2

Browse files
andy-shevakpm00
authored andcommitted
mm: remove unused stub for can_swapin_thp()
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 6863f56 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Link: https://lkml.kernel.org/r/[email protected] Fixes: 242d12c ("mm: support large folios swap-in for sync io devices") Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Barry Song <[email protected]> Cc: Bill Wendling <[email protected]> Cc: Chuanhua Han <[email protected]> Cc: Justin Stitt <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 3f4e74c commit a5e8eb2

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

mm/memory.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4181,11 +4181,6 @@ static struct folio *alloc_swap_folio(struct vm_fault *vmf)
41814181
return __alloc_swap_folio(vmf);
41824182
}
41834183
#else /* !CONFIG_TRANSPARENT_HUGEPAGE */
4184-
static inline bool can_swapin_thp(struct vm_fault *vmf, pte_t *ptep, int nr_pages)
4185-
{
4186-
return false;
4187-
}
4188-
41894184
static struct folio *alloc_swap_folio(struct vm_fault *vmf)
41904185
{
41914186
return __alloc_swap_folio(vmf);

0 commit comments

Comments
 (0)