]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ACPI: RISCV: Make acpi_numa_get_nid() to be static
authorHanjun Guo <guohanjun@huawei.com>
Sun, 11 Aug 2024 03:18:04 +0000 (11:18 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Tue, 17 Sep 2024 19:02:48 +0000 (12:02 -0700)
acpi_numa_get_nid() is only called in acpi_numa.c for riscv,
no need to add it in head file, so make it static and remove
related functions in the asm/acpi.h.

Spotted by doing some cleanup for arm64 ACPI.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Reviewed-by: Haibo Xu <haibo1.xu@intel.com>
Link: https://lore.kernel.org/r/20240811031804.3347298-1-guohanjun@huawei.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/acpi.h
arch/riscv/kernel/acpi_numa.c

index e0a1f84404f31cc7fd467d50f9282f54b91860d7..6e13695120bc218573c35170313dc4029ec59e58 100644 (file)
@@ -91,10 +91,8 @@ static inline void acpi_get_cbo_block_size(struct acpi_table_header *table,
 #endif /* CONFIG_ACPI */
 
 #ifdef CONFIG_ACPI_NUMA
-int acpi_numa_get_nid(unsigned int cpu);
 void acpi_map_cpus_to_nodes(void);
 #else
-static inline int acpi_numa_get_nid(unsigned int cpu) { return NUMA_NO_NODE; }
 static inline void acpi_map_cpus_to_nodes(void) { }
 #endif /* CONFIG_ACPI_NUMA */
 
index 0231482d6946aa7648c444a617d44f73aa87cb0e..a93c773b60e6a6acb16b94c68105648ae2223e12 100644 (file)
@@ -30,7 +30,7 @@
 
 static int acpi_early_node_map[NR_CPUS] __initdata = { NUMA_NO_NODE };
 
-int __init acpi_numa_get_nid(unsigned int cpu)
+static int __init acpi_numa_get_nid(unsigned int cpu)
 {
        return acpi_early_node_map[cpu];
 }