From: YueHaibing <yuehaibing@xxxxxxxxxx> Subject: mm/hmm.c: remove set but not used variable 'devmem' Fixes gcc '-Wunused-but-set-variable' warning: mm/hmm.c: In function 'hmm_devmem_ref_kill': mm/hmm.c:995:21: warning: variable 'devmem' set but not used [-Wunused-but-set-variable] It not used any more since 35d39f953d4e ("mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()") Link: http://lkml.kernel.org/r/1543629971-128377-1-git-send-email-yuehaibing@xxxxxxxxxx Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx> Reviewed-by: Reviewed-by: Jérôme Glisse <jglisse@xxxxxxxxxx> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/mm/hmm.c~mm-hmm-remove-set-but-not-used-variable-devmem +++ a/mm/hmm.c @@ -992,9 +992,6 @@ static void hmm_devmem_ref_exit(void *da static void hmm_devmem_ref_kill(struct percpu_ref *ref) { - struct hmm_devmem *devmem; - - devmem = container_of(ref, struct hmm_devmem, ref); percpu_ref_kill(ref); } _