summaryrefslogtreecommitdiff
path: root/arch/riscv/kernel/setup.c
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2020-11-26 05:40:38 +0300
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-01-08 04:19:17 +0300
commit641e8cd2cbf0451e118fca33d5db10124dd87458 (patch)
treea51c0c5752fe9b700e2fbe14ade95d6369b7b8ae /arch/riscv/kernel/setup.c
parente71ba9452f0b5b2e8dc8aa5445198cd9214a6a62 (diff)
downloadlinux-641e8cd2cbf0451e118fca33d5db10124dd87458.tar.xz
riscv: Cleanup sbi function stubs when RISCV_SBI disabled
Fix sbi_init() function declaration mismatch between RISCV_SBI enable and disable, as it always returned 0, make it void function. Drop some stubs which won't be used if RISCV_SBI disabled. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Reviewed-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/kernel/setup.c')
-rw-r--r--arch/riscv/kernel/setup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index 1d85e9bf783c..a43a954ef529 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -251,8 +251,7 @@ void __init setup_arch(char **cmdline_p)
pr_err("No DTB found in kernel mappings\n");
#endif
- if (IS_ENABLED(CONFIG_RISCV_SBI))
- sbi_init();
+ sbi_init();
if (IS_ENABLED(CONFIG_STRICT_KERNEL_RWX))
protect_kernel_text_data();