Skip to content

Commit

Permalink
lib: fix build failure in CONFIG_DEBUG_VIRTUAL test
Browse files Browse the repository at this point in the history
commit 10fdf83 upstream.

On several arches, virt_to_phys() is in io.h

Build fails without it:

  CC      lib/test_debug_virtual.o
lib/test_debug_virtual.c: In function 'test_debug_virtual_init':
lib/test_debug_virtual.c:26:7: error: implicit declaration of function 'virt_to_phys' [-Werror=implicit-function-declaration]
  pa = virt_to_phys(va);
       ^

Fixes: e4dace3 ("lib: add test module for CONFIG_DEBUG_VIRTUAL")
CC: stable@vger.kernel.org
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
chleroy authored and gregkh committed Jan 13, 2019
1 parent 8dbea64 commit 4f44e58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/test_debug_virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/sizes.h>
#include <linux/io.h>

#include <asm/page.h>
#ifdef CONFIG_MIPS
Expand Down

0 comments on commit 4f44e58

Please sign in to comment.