Re: [PATCH] ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE

From: Sunil V L
Date: Mon Jul 29 2024 - 02:28:46 EST


On Mon, Jul 29, 2024 at 11:59:55AM +0800, Haibo Xu wrote:
> Currently, only acpi_early_node_map[0] was initialized to NUMA_NO_NODE.
> To ensure all the values were properly initialized, switch to initialize
> all of them to NUMA_NO_NODE.
>
> Suggested-by: Andrew Jones <ajones@xxxxxxxxxxxxxxxx>
> Signed-off-by: Haibo Xu <haibo1.xu@xxxxxxxxx>
> ---
> arch/arm64/kernel/acpi_numa.c | 2 +-
> arch/riscv/kernel/acpi_numa.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/acpi_numa.c b/arch/arm64/kernel/acpi_numa.c
> index 0c036a9a3c33..2465f291c7e1 100644
> --- a/arch/arm64/kernel/acpi_numa.c
> +++ b/arch/arm64/kernel/acpi_numa.c
> @@ -27,7 +27,7 @@
>
> #include <asm/numa.h>
>
> -static int acpi_early_node_map[NR_CPUS] __initdata = { NUMA_NO_NODE };
> +static int acpi_early_node_map[NR_CPUS] __initdata = { [0 ... NR_CPUS - 1] = NUMA_NO_NODE };
>
> int __init acpi_numa_get_nid(unsigned int cpu)
> {
> diff --git a/arch/riscv/kernel/acpi_numa.c b/arch/riscv/kernel/acpi_numa.c
> index 0231482d6946..ff95aeebee3e 100644
> --- a/arch/riscv/kernel/acpi_numa.c
> +++ b/arch/riscv/kernel/acpi_numa.c
> @@ -28,7 +28,7 @@
>
> #include <asm/numa.h>
>
> -static int acpi_early_node_map[NR_CPUS] __initdata = { NUMA_NO_NODE };
> +static int acpi_early_node_map[NR_CPUS] __initdata = { [0 ... NR_CPUS - 1] = NUMA_NO_NODE };
>
The change looks good to me. However, I was wondering whether it needs
"Fixes" tag in which case I think you will have to split this patch into
two.

Otherwise,
Reviewed-by: Sunil V L <sunilvl@xxxxxxxxxxxxxxxx>

Thanks!
Sunil
> int __init acpi_numa_get_nid(unsigned int cpu)
> {
> --
> 2.34.1
>