Skip to content

Commit

Permalink
tee: optee: fix header dependencies
Browse files Browse the repository at this point in the history
The optee driver includes the header files in an unusual order,
with asm/pgtable.h before the linux/*.h headers. For some reason
this seems to trigger a build failure:

drivers/tee/optee/call.c: In function 'optee_fill_pages_list':
include/asm-generic/memory_model.h:64:14: error: implicit declaration of function 'page_to_section'; did you mean '__nr_to_section'? [-Werror=implicit-function-declaration]
  int __sec = page_to_section(__pg);   \
drivers/tee/optee/call.c:494:15: note: in expansion of macro 'page_to_phys'
  optee_page = page_to_phys(*pages) +

Let's just include linux/mm.h, which will then get the other
header implicitly.

Fixes: 3bb48ba ("tee: optee: add page list manipulation functions")
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
arndb authored and al1img committed May 5, 2021
1 parent a3a22bc commit 5fcac26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tee/optee/call.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* GNU General Public License for more details.
*
*/
#include <asm/pgtable.h>
#include <linux/arm-smccc.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/tee_drv.h>
#include <linux/types.h>
Expand Down

0 comments on commit 5fcac26

Please sign in to comment.