]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/mm: remove warning about ‘type’ being set
authorMathieu Malaterre <malat@debian.org>
Fri, 22 Jun 2018 19:27:47 +0000 (21:27 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 10 Aug 2018 12:12:38 +0000 (22:12 +1000)
‘type’ is only used when CONFIG_DEBUG_HIGHMEM is set. So add a possibly
unused tag to variable. Remove warning treated as error with W=1:

  arch/powerpc/mm/highmem.c:59:6: error: variable ‘type’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/highmem.c

index 668e87d03f9e0823d25205eade2a3213fe3f29df..82a0e37557a5ac26f0ea948bc8c3c424a749e150 100644 (file)
@@ -56,7 +56,7 @@ EXPORT_SYMBOL(kmap_atomic_prot);
 void __kunmap_atomic(void *kvaddr)
 {
        unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
-       int type;
+       int type __maybe_unused;
 
        if (vaddr < __fix_to_virt(FIX_KMAP_END)) {
                pagefault_enable();