The patch titled Subject: mempolicy: clean up minor dead code in queue_pages_test_walk() has been added to the -mm mm-unstable branch. Its filename is mempolicy-clean-up-minor-dead-code-in-queue_pages_test_walk.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mempolicy-clean-up-minor-dead-code-in-queue_pages_test_walk.patch This patch will later appear in the mm-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: Lukas Bulwahn <lukas.bulwahn@xxxxxxxxx> Subject: mempolicy: clean up minor dead code in queue_pages_test_walk() Date: Mon, 22 Jan 2024 10:25:04 +0100 Commit 2cafb582173f ("mempolicy: remove confusing MPOL_MF_LAZY dead code") removes MPOL_MF_LAZY handling in queue_pages_test_walk(), and with that, there is no effective use of the local variable endvma in that function remaining. Remove the local variable endvma and its dead code. No functional change. This issue was identified with clang-analyzer's dead stores analysis. Link: https://lkml.kernel.org/r/20240122092504.18377-1-lukas.bulwahn@xxxxxxxxx Signed-off-by: Lukas Bulwahn <lukas.bulwahn@xxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mempolicy.c | 4 ---- 1 file changed, 4 deletions(-) --- a/mm/mempolicy.c~mempolicy-clean-up-minor-dead-code-in-queue_pages_test_walk +++ a/mm/mempolicy.c @@ -676,7 +676,6 @@ static int queue_pages_test_walk(unsigne { struct vm_area_struct *next, *vma = walk->vma; struct queue_pages *qp = walk->private; - unsigned long endvma = vma->vm_end; unsigned long flags = qp->flags; /* range check first */ @@ -704,9 +703,6 @@ static int queue_pages_test_walk(unsigne !(flags & MPOL_MF_STRICT)) return 1; - if (endvma > end) - endvma = end; - /* * Check page nodes, and queue pages to move, in the current vma. * But if no moving, and no strict checking, the scan can be skipped. _ Patches currently in -mm which might be from lukas.bulwahn@xxxxxxxxx are maple_tree-avoid-duplicate-variable-init-in-mast_spanning_rebalance.patch mempolicy-clean-up-minor-dead-code-in-queue_pages_test_walk.patch