On Wed, 23 Oct 2019, Kefeng Wang wrote: > 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 > Fixes: d95f1a542c3d ("RISC-V: Implement sparsemem") > Signed-off-by: Kefeng Wang Thanks for the fix, but this patch adds checkpatch errors: --- ERROR: space required after that ',' (ctx:VxV) #37: FILE: arch/riscv/include/asm/pgtable.h:187: +#define mk_pte(page,prot) pfn_pte(page_to_pfn(page),prot) ^ ERROR: space required after that ',' (ctx:VxV) #37: FILE: arch/riscv/include/asm/pgtable.h:187: +#define mk_pte(page,prot) pfn_pte(page_to_pfn(page),prot) ^ total: 2 errors, 0 warnings, 0 checks, 11 lines checked --- Please run 'checkpatch.pl --strict' on patches before submitting. Anyway, these have been fixed up here and queued for v5.4-rc with Logan's Reviewed-by:. - Paul