The patch titled Subject: proc: avoid unused variable warning in pagemap_pmd_range() has been added to the -mm tree. Its filename is proc-avoid-unused-variable-warning-in-pagemap_pmd_range.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/proc-avoid-unused-variable-warning-in-pagemap_pmd_range.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/proc-avoid-unused-variable-warning-in-pagemap_pmd_range.patch 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 and is updated there every 3-4 working days ------------------------------------------------------ From: Nathan Chancellor <nathan@xxxxxxxxxx> Subject: proc: avoid unused variable warning in pagemap_pmd_range() When building with CONFIG_TRANSPARENT_HUGEPAGE=n, there is a warning about migration being unused: fs/proc/task_mmu.c:1444:7: warning: unused variable 'migration' [-Wunused-variable] bool migration = false; ^ 1 warning generated. Move the ifdef preprocessor directive up to include migration so it is only included in the file when it is used. Link: https://lkml.kernel.org/r/20220207171049.1102239-1-nathan@xxxxxxxxxx Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx> Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/proc/task_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/proc/task_mmu.c~proc-avoid-unused-variable-warning-in-pagemap_pmd_range +++ a/fs/proc/task_mmu.c @@ -1441,9 +1441,9 @@ static int pagemap_pmd_range(pmd_t *pmdp spinlock_t *ptl; pte_t *pte, *orig_pte; int err = 0; +#ifdef CONFIG_TRANSPARENT_HUGEPAGE bool migration = false; -#ifdef CONFIG_TRANSPARENT_HUGEPAGE ptl = pmd_trans_huge_lock(pmdp, vma); if (ptl) { u64 flags = 0, frame = 0; _ Patches currently in -mm which might be from nathan@xxxxxxxxxx are proc-avoid-unused-variable-warning-in-pagemap_pmd_range.patch