Skip to content

Commit 9c375cf

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
riscv: mm: init: make pt_ops_set_[early|late|fixmap] static
These three functions are only used in init.c, so make them static. Fix W=1 warnings like below: arch/riscv/mm/init.c:721:13: warning: no previous prototype for function 'pt_ops_set_early' [-Wmissing-prototypes] void __init pt_ops_set_early(void) ^ Signed-off-by: Jisheng Zhang <[email protected]> Reviewed-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 9eb2e45 commit 9c375cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/riscv/mm/init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ static void __init create_fdt_early_page_table(pgd_t *pgdir, uintptr_t dtb_pa)
879879
* MMU is not enabled, the page tables are allocated directly using
880880
* early_pmd/pud/p4d and the address returned is the physical one.
881881
*/
882-
void __init pt_ops_set_early(void)
882+
static void __init pt_ops_set_early(void)
883883
{
884884
pt_ops.alloc_pte = alloc_pte_early;
885885
pt_ops.get_pte_virt = get_pte_virt_early;
@@ -901,7 +901,7 @@ void __init pt_ops_set_early(void)
901901
* Note that this is called with MMU disabled, hence kernel_mapping_pa_to_va,
902902
* but it will be used as described above.
903903
*/
904-
void __init pt_ops_set_fixmap(void)
904+
static void __init pt_ops_set_fixmap(void)
905905
{
906906
pt_ops.alloc_pte = kernel_mapping_pa_to_va((uintptr_t)alloc_pte_fixmap);
907907
pt_ops.get_pte_virt = kernel_mapping_pa_to_va((uintptr_t)get_pte_virt_fixmap);
@@ -919,7 +919,7 @@ void __init pt_ops_set_fixmap(void)
919919
* MMU is enabled and page table setup is complete, so from now, we can use
920920
* generic page allocation functions to setup page table.
921921
*/
922-
void __init pt_ops_set_late(void)
922+
static void __init pt_ops_set_late(void)
923923
{
924924
pt_ops.alloc_pte = alloc_pte_late;
925925
pt_ops.get_pte_virt = get_pte_virt_late;

0 commit comments

Comments
 (0)