diff mbox series

RISC-V: Declare per cpu boot data as static

Message ID 20220323171726.1303706-1-atishp@rivosinc.com (mailing list archive)
State New, archived
Headers show
Series RISC-V: Declare per cpu boot data as static | expand

Commit Message

Atish Patra March 23, 2022, 5:17 p.m. UTC
The per cpu boot data is only used within the cpu_ops_sbi.c. It can
be delcared as static.

Fixes: 9a2451f18663 ("RISC-V: Avoid using per cpu array for ordered booting")

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
---
 arch/riscv/kernel/cpu_ops_sbi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Palmer Dabbelt March 31, 2022, 8:28 p.m. UTC | #1
On Wed, 23 Mar 2022 10:17:26 PDT (-0700), Atish Patra wrote:
> The per cpu boot data is only used within the cpu_ops_sbi.c. It can
> be delcared as static.
>
> Fixes: 9a2451f18663 ("RISC-V: Avoid using per cpu array for ordered booting")
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Atish Patra <atishp@rivosinc.com>
> ---
>  arch/riscv/kernel/cpu_ops_sbi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/cpu_ops_sbi.c b/arch/riscv/kernel/cpu_ops_sbi.c
> index dae29cbfe550..7f2ad008274f 100644
> --- a/arch/riscv/kernel/cpu_ops_sbi.c
> +++ b/arch/riscv/kernel/cpu_ops_sbi.c
> @@ -21,7 +21,7 @@ const struct cpu_operations cpu_ops_sbi;
>   * be invoked from multiple threads in parallel. Define a per cpu data
>   * to handle that.
>   */
> -DEFINE_PER_CPU(struct sbi_hart_boot_data, boot_data);
> +static DEFINE_PER_CPU(struct sbi_hart_boot_data, boot_data);
>
>  static int sbi_hsm_hart_start(unsigned long hartid, unsigned long saddr,
>  			      unsigned long priv)

Thanks, this is on for-next.
diff mbox series

Patch

diff --git a/arch/riscv/kernel/cpu_ops_sbi.c b/arch/riscv/kernel/cpu_ops_sbi.c
index dae29cbfe550..7f2ad008274f 100644
--- a/arch/riscv/kernel/cpu_ops_sbi.c
+++ b/arch/riscv/kernel/cpu_ops_sbi.c
@@ -21,7 +21,7 @@  const struct cpu_operations cpu_ops_sbi;
  * be invoked from multiple threads in parallel. Define a per cpu data
  * to handle that.
  */
-DEFINE_PER_CPU(struct sbi_hart_boot_data, boot_data);
+static DEFINE_PER_CPU(struct sbi_hart_boot_data, boot_data);
 
 static int sbi_hsm_hart_start(unsigned long hartid, unsigned long saddr,
 			      unsigned long priv)