[PATCH v2 6/8] riscv: annotate check_unaligned_access_boot_cpu() with __init

Clément Léger posted 8 patches 2 years, 3 months ago
[PATCH v2 6/8] riscv: annotate check_unaligned_access_boot_cpu() with __init
Posted by Clément Léger 2 years, 3 months ago
This function is solely called as an initcall, thus annotate it with
__init.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
---
 arch/riscv/kernel/cpufeature.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 1cfbba65d11a..356e5677eeb1 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -645,7 +645,7 @@ void check_unaligned_access(int cpu)
 	__free_pages(page, get_order(MISALIGNED_BUFFER_SIZE));
 }
 
-static int check_unaligned_access_boot_cpu(void)
+static int __init check_unaligned_access_boot_cpu(void)
 {
 	check_unaligned_access(0);
 	return 0;
-- 
2.42.0

Re: [PATCH v2 6/8] riscv: annotate check_unaligned_access_boot_cpu() with __init
Posted by Evan Green 2 years, 3 months ago
On Wed, Oct 4, 2023 at 8:14 AM Clément Léger <cleger@rivosinc.com> wrote:
>
> This function is solely called as an initcall, thus annotate it with
> __init.
>
> Signed-off-by: Clément Léger <cleger@rivosinc.com>

Ah, nice fix.

Reviewed-by: Evan Green <evan@rivosinc.com>