The patch titled Subject: mm/z3fold: fix -Wunused-but-set-variable warnings has been added to the -mm tree. Its filename is z3fold-add-inter-page-compaction-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/z3fold-add-inter-page-compaction-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/z3fold-add-inter-page-compaction-fix.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: Qian Cai <cai@xxxxxx> Subject: mm/z3fold: fix -Wunused-but-set-variable warnings The linux-next commit "mm/z3fold.c: add inter-page compaction" [1] introduced a few GCC compilation warnings. mm/z3fold.c: In function 'compact_single_buddy': mm/z3fold.c:693:16: warning: variable 'newpage' set but not used [-Wunused-but-set-variable] struct page *newpage; ^~~~~~~ mm/z3fold.c:664:13: warning: variable 'bud' set but not used [-Wunused-but-set-variable] enum buddy bud; ^~~ Simply remove those seems accidentally left-over code. [1] http://lkml.kernel.org/r/20191006041457.24113-1-vitalywool@xxxxxxxxx Link: http://lkml.kernel.org/r/1570542062-29144-1-git-send-email-cai@xxxxxx Signed-off-by: Qian Cai <cai@xxxxxx> Cc: Vitaly Wool <vitaly.vul@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/z3fold.c | 6 ------ 1 file changed, 6 deletions(-) --- a/mm/z3fold.c~z3fold-add-inter-page-compaction-fix +++ a/mm/z3fold.c @@ -661,7 +661,6 @@ static struct z3fold_header *compact_sin struct z3fold_pool *pool = zhdr_to_pool(zhdr); void *p = zhdr; unsigned long old_handle = 0; - enum buddy bud; size_t sz = 0; struct z3fold_header *new_zhdr = NULL; int first_idx = __idx(zhdr, FIRST); @@ -673,24 +672,20 @@ static struct z3fold_header *compact_sin * the page lock is already taken */ if (zhdr->first_chunks && zhdr->slots->slot[first_idx]) { - bud = FIRST; p += ZHDR_SIZE_ALIGNED; sz = zhdr->first_chunks << CHUNK_SHIFT; old_handle = (unsigned long)&zhdr->slots->slot[first_idx]; } else if (zhdr->middle_chunks && zhdr->slots->slot[middle_idx]) { - bud = MIDDLE; p += zhdr->start_middle << CHUNK_SHIFT; sz = zhdr->middle_chunks << CHUNK_SHIFT; old_handle = (unsigned long)&zhdr->slots->slot[middle_idx]; } else if (zhdr->last_chunks && zhdr->slots->slot[last_idx]) { - bud = LAST; p += PAGE_SIZE - (zhdr->last_chunks << CHUNK_SHIFT); sz = zhdr->last_chunks << CHUNK_SHIFT; old_handle = (unsigned long)&zhdr->slots->slot[last_idx]; } if (sz > 0) { - struct page *newpage; enum buddy new_bud = HEADLESS; short chunks = size_to_chunks(sz); void *q; @@ -699,7 +694,6 @@ static struct z3fold_header *compact_sin if (!new_zhdr) return NULL; - newpage = virt_to_page(new_zhdr); if (WARN_ON(new_zhdr == zhdr)) goto out_fail; _ Patches currently in -mm which might be from cai@xxxxxx are mm-slub-fix-a-deadlock-in-show_slab_objects.patch z3fold-add-inter-page-compaction-fix.patch hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix-fix.patch