diff mbox series

ACPI: RISCV: Make acpi_numa_get_nid() to be static

Message ID 20240811031804.3347298-1-guohanjun@huawei.com (mailing list archive)
State Accepted
Commit 21d98d658f9e5967dc30c321bc258b50740c6665
Headers show
Series ACPI: RISCV: Make acpi_numa_get_nid() to be static | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh
conchuod/patch-1-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh
conchuod/patch-1-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh
conchuod/patch-1-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-1-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-1-test-6 success .github/scripts/patches/tests/checkpatch.sh
conchuod/patch-1-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh
conchuod/patch-1-test-8 success .github/scripts/patches/tests/header_inline.sh
conchuod/patch-1-test-9 success .github/scripts/patches/tests/kdoc.sh
conchuod/patch-1-test-10 success .github/scripts/patches/tests/module_param.sh
conchuod/patch-1-test-11 success .github/scripts/patches/tests/verify_fixes.sh
conchuod/patch-1-test-12 success .github/scripts/patches/tests/verify_signedoff.sh

Commit Message

Hanjun Guo Aug. 11, 2024, 3:18 a.m. UTC
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>
---
 arch/riscv/include/asm/acpi.h | 2 --
 arch/riscv/kernel/acpi_numa.c | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Xu, Haibo1 Aug. 13, 2024, 12:58 p.m. UTC | #1
> -----Original Message-----
> From: Hanjun Guo <guohanjun@huawei.com>
> Sent: Sunday, August 11, 2024 11:18 AM
> To: Sunil V L <sunilvl@ventanamicro.com>; Xu, Haibo1 <haibo1.xu@intel.com>;
> Paul Walmsley <paul.walmsley@sifive.com>; Palmer Dabbelt
> <palmer@dabbelt.com>; Albert Ou <aou@eecs.berkeley.edu>
> Cc: Sudeep Holla <sudeep.holla@arm.com>; Lorenzo Pieralisi
> <lpieralisi@kernel.org>; Rafael J . Wysocki <rafael@kernel.org>; linux-
> acpi@vger.kernel.org; linux-riscv@lists.infradead.org; Hanjun Guo
> <guohanjun@huawei.com>
> Subject: [PATCH] ACPI: RISCV: Make acpi_numa_get_nid() to be static
> 
> 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>
> ---
>  arch/riscv/include/asm/acpi.h | 2 --
>  arch/riscv/kernel/acpi_numa.c | 2 +-
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/riscv/include/asm/acpi.h b/arch/riscv/include/asm/acpi.h index
> e0a1f84404f3..6e13695120bc 100644
> --- a/arch/riscv/include/asm/acpi.h
> +++ b/arch/riscv/include/asm/acpi.h
> @@ -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 */
> 
> diff --git a/arch/riscv/kernel/acpi_numa.c b/arch/riscv/kernel/acpi_numa.c
> index 0231482d6946..a93c773b60e6 100644
> --- a/arch/riscv/kernel/acpi_numa.c
> +++ b/arch/riscv/kernel/acpi_numa.c
> @@ -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];
>  }

LGTM!
Reviewed-by: Haibo Xu <haibo1.xu@intel.com>

> --
> 2.25.1
patchwork-bot+linux-riscv@kernel.org Sept. 17, 2024, 7:10 p.m. UTC | #2
Hello:

This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Sun, 11 Aug 2024 11:18:04 +0800 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - ACPI: RISCV: Make acpi_numa_get_nid() to be static
    https://git.kernel.org/riscv/c/21d98d658f9e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/arch/riscv/include/asm/acpi.h b/arch/riscv/include/asm/acpi.h
index e0a1f84404f3..6e13695120bc 100644
--- a/arch/riscv/include/asm/acpi.h
+++ b/arch/riscv/include/asm/acpi.h
@@ -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 */
 
diff --git a/arch/riscv/kernel/acpi_numa.c b/arch/riscv/kernel/acpi_numa.c
index 0231482d6946..a93c773b60e6 100644
--- a/arch/riscv/kernel/acpi_numa.c
+++ b/arch/riscv/kernel/acpi_numa.c
@@ -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];
 }