Skip to content

Commit

Permalink
optee: smc_abi.c: add missing #include <linux/mm.h>
Browse files Browse the repository at this point in the history
Adds missing #include <linux/mm.h> drivers/tee/optee/smc_abi.c to fix
compile errors like:
drivers/tee/optee/smc_abi.c:405:15: error: implicit
declaration of function 'page_to_section'
[-Werror,-Wimplicit-function-declaration]
        optee_page = page_to_phys(*pages) +
                     ^
arch/arm/include/asm/memory.h:148:43: note: expanded from
macro 'page_to_phys'
                                               ^
include/asm-generic/memory_model.h:52:21: note: expanded
from macro 'page_to_pfn'
                    ^
include/asm-generic/memory_model.h:35:14: note: expanded
from macro '__page_to_pfn'
        int __sec = page_to_section(__pg);                      \
                    ^
drivers/tee/optee/smc_abi.c:405:15: note: did you mean
'__nr_to_section'?
arch/arm/include/asm/memory.h:148:43: note: expanded from
macro 'page_to_phys'
                                               ^
include/asm-generic/memory_model.h:52:21: note: expanded
from macro 'page_to_pfn'
                    ^
include/asm-generic/memory_model.h:35:14: note: expanded
from macro '__page_to_pfn'
        int __sec = page_to_section(__pg);                      \
                    ^
include/linux/mmzone.h:1365:35: note: '__nr_to_section'
declared here
static inline struct mem_section *__nr_to_section(unsigned long nr)

Fixes: c51a564 ("optee: isolate smc abi")
Signed-off-by: Jens Wiklander <[email protected]>
Link: https://lore.kernel.org/r/[email protected]'
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
jenswi-linaro authored and arndb committed Oct 21, 2021
1 parent bccb5d5 commit 34f3c67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/tee/optee/smc_abi.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
Expand Down

0 comments on commit 34f3c67

Please sign in to comment.