Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Highmem: Fix build error if CONFIG_DEBUG_HIGHMEM is disabled

CC arch/mips/mm/highmem.o
/home/ralf/src/linux/linux-mips/arch/mips/mm/highmem.c: In function ‘__kunmap_atomic’:
/home/ralf/src/linux/linux-mips/arch/mips/mm/highmem.c:70:6: error: variable ‘type’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

This warning exists in gcc 4.6.0 and newer. Kernels 2.6.40 and newer use
-Wunused-but-set-variable to suppress it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+2 -1
+2 -1
arch/mips/mm/highmem.c
··· 1 + #include <linux/compiler.h> 1 2 #include <linux/module.h> 2 3 #include <linux/highmem.h> 3 4 #include <linux/sched.h> ··· 68 67 void __kunmap_atomic(void *kvaddr) 69 68 { 70 69 unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; 71 - int type; 70 + int type __maybe_unused; 72 71 73 72 if (vaddr < FIXADDR_START) { // FIXME 74 73 pagefault_enable();