Skip to content

Commit

Permalink
mm/early_ioremap: add explicit #include of asm/early_ioremap.h
Browse files Browse the repository at this point in the history
Commit 6b0f68e ("mm: add utility for early copy from unmapped ram")
introduces a function copy_from_early_mem() into mm/early_ioremap.c
which itself calls early_memremap()/early_memunmap().  However, since
early_memunmap() has not been declared yet at this point in the .c file,
nor by any explicitly included header files, we are depending on a
transitive include of asm/early_ioremap.h to declare it, which is
fragile.

So instead, include this header explicitly.

Signed-off-by: Ard Biesheuvel <[email protected]>
Acked-by: Mark Salter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Ard Biesheuvel authored and torvalds committed Sep 11, 2015
1 parent 6798a8c commit 4f1af60
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/early_ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/mm.h>
#include <linux/vmalloc.h>
#include <asm/fixmap.h>
#include <asm/early_ioremap.h>

#ifdef CONFIG_MMU
static int early_ioremap_debug __initdata;
Expand Down

0 comments on commit 4f1af60

Please sign in to comment.