Skip to content

Commit 5da96bd

Browse files
gormanmtorvalds
authored andcommitted
mm/vmalloc: include header for prototype of set_iounmap_nonlazy
make W=1 generates the following warning for mm/vmalloc.c mm/vmalloc.c:1599:6: warning: no previous prototype for `set_iounmap_nonlazy' [-Wmissing-prototypes] void set_iounmap_nonlazy(void) ^~~~~~~~~~~~~~~~~~~ This is an arch-generic function only used by x86. On other arches, it's dead code. Include the header with the definition and make it x86-64 specific. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Mel Gorman <[email protected]> Reviewed-by: Yang Shi <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Cc: Dan Streetman <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent f611fab commit 5da96bd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mm/vmalloc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <linux/notifier.h>
2626
#include <linux/rbtree.h>
2727
#include <linux/xarray.h>
28+
#include <linux/io.h>
2829
#include <linux/rcupdate.h>
2930
#include <linux/pfn.h>
3031
#include <linux/kmemleak.h>
@@ -1607,6 +1608,7 @@ static DEFINE_MUTEX(vmap_purge_lock);
16071608
/* for per-CPU blocks */
16081609
static void purge_fragmented_blocks_allcpus(void);
16091610

1611+
#ifdef CONFIG_X86_64
16101612
/*
16111613
* called before a call to iounmap() if the caller wants vm_area_struct's
16121614
* immediately freed.
@@ -1615,6 +1617,7 @@ void set_iounmap_nonlazy(void)
16151617
{
16161618
atomic_long_set(&vmap_lazy_nr, lazy_max_pages()+1);
16171619
}
1620+
#endif /* CONFIG_X86_64 */
16181621

16191622
/*
16201623
* Purges all lazily-freed vmap areas.

0 commit comments

Comments
 (0)