]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Fix implicit declaration of 'page_to_section'
authorKefeng Wang <wangkefeng.wang@huawei.com>
Wed, 23 Oct 2019 03:23:01 +0000 (11:23 +0800)
committerPaul Walmsley <paul.walmsley@sifive.com>
Wed, 23 Oct 2019 21:53:46 +0000 (14:53 -0700)
commit495bad3e26a5f715760e9f5f27e672558f66b799
treeec446ce613be76450b3c6f73e540f9b75def2a90
parent5b05a18a155b958cdbb5352dbff7fbc1f1189ebc
riscv: Fix implicit declaration of 'page_to_section'

With CONFIG_SPARSEMEM and !CONFIG_SPARSEMEM_VMEMMAP,

arch/riscv/include/asm/pgtable.h: In function ‘mk_pte’:
include/asm-generic/memory_model.h:64:14: error: implicit declaration of function ‘page_to_section’; did you mean ‘present_section’? [-Werror=implicit-function-declaration]
  int __sec = page_to_section(__pg);   \
              ^~~~~~~~~~~~~~~

Fixed by changing mk_pte() from inline function to macro.

Cc: Logan Gunthorpe <logang@deltatee.com>
Fixes: 6926d79460ca ("RISC-V: Implement sparsemem")
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
[paul.walmsley@sifive.com: fixed checkpatch errors]
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
arch/riscv/include/asm/pgtable.h