| From | Josh Triplett <> | Subject | [PATCH 23/58] mm: Avoid defining set_iounmap_nonlazy on non-x86 | Date | Sun, 18 Nov 2012 21:28:02 -0800 |
| |
Commit 3ee48b6af49cf534ca2f481ecc484b156a41451d added the set_iounmap_nonlazy function for use on x86, but actually defined it on all architectures. Only x86 prototypes this function (in asm/io.h), and only x86 uses it (in arch/x86/kernel/crash_dump_64.c), so avoid defining it on non-x86.
Meanwhile, include the appropriate header with the prototype, to eliminate a warning from gcc (-Wmissing-prototypes) and from Sparse (-Wdecl).
mm/vmalloc.c:563:6: warning: no previous prototype for ‘set_iounmap_nonlazy’ [-Wmissing-prototypes]
Signed-off-by: Josh Triplett <josh@joshtriplett.org> --- mm/vmalloc.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 78e0830..fc32a0a 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -27,6 +27,7 @@ #include <linux/pfn.h> #include <linux/kmemleak.h> #include <linux/atomic.h> +#include <linux/io.h> #include <asm/uaccess.h> #include <asm/tlbflush.h> #include <asm/shmparam.h> @@ -556,6 +557,7 @@ static atomic_t vmap_lazy_nr = ATOMIC_INIT(0); /* for per-CPU blocks */ static void purge_fragmented_blocks_allcpus(void); +#ifdef CONFIG_X86 /* * called before a call to iounmap() if the caller wants vm_area_struct's * immediately freed. @@ -564,6 +566,7 @@ void set_iounmap_nonlazy(void) { atomic_set(&vmap_lazy_nr, lazy_max_pages()+1); } +#endif /* * Purges all lazily-freed vmap areas. -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|