riscv: kexec: Fix W=1 build warnings

Fixes the following W=1 build warning(s):

In file included from include/linux/kexec.h:28,
from arch/riscv/kernel/machine_kexec.c:7:
arch/riscv/include/asm/kexec.h:45:1: warning: ‘extern’ is not at beginning of declaration [-Wold-style-declaration]
45 | const extern unsigned char riscv_kexec_relocate[];
| ^~~~~
arch/riscv/include/asm/kexec.h:46:1: warning: ‘extern’ is not at beginning of declaration [-Wold-style-declaration]
46 | const extern unsigned int riscv_kexec_relocate_size;
| ^~~~~
arch/riscv/kernel/machine_kexec.c:125:6: warning: no previous prototype for ‘machine_shutdown’ [-Wmissing-prototypes]
125 | void machine_shutdown(void)
| ^~~~~~~~~~~~~~~~
arch/riscv/kernel/machine_kexec.c:147:1: warning: no previous prototype for ‘machine_crash_shutdown’ [-Wmissing-prototypes]
147 | machine_crash_shutdown(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/machine_kexec.c:23: warning: Function parameter or member 'image' not described in 'kexec_image_info'
arch/riscv/kernel/machine_kexec.c:53: warning: Function parameter or member 'image' not described in 'machine_kexec_prepare'
arch/riscv/kernel/machine_kexec.c:114: warning: Function parameter or member 'image' not described in 'machine_kexec_cleanup'
arch/riscv/kernel/machine_kexec.c:148: warning: Function parameter or member 'regs' not described in 'machine_crash_shutdown'
arch/riscv/kernel/machine_kexec.c:167: warning: Function parameter or member 'image' not described in 'machine_kexec'

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>

authored by Jisheng Zhang and committed by Palmer Dabbelt bab0d47c 02ccdeed

Changed files
+8 -7
arch
riscv
include
asm
kernel
+2 -2
arch/riscv/include/asm/kexec.h
··· 42 42 unsigned long fdt_addr; 43 43 }; 44 44 45 - const extern unsigned char riscv_kexec_relocate[]; 46 - const extern unsigned int riscv_kexec_relocate_size; 45 + extern const unsigned char riscv_kexec_relocate[]; 46 + extern const unsigned int riscv_kexec_relocate_size; 47 47 48 48 typedef void (*riscv_kexec_method)(unsigned long first_ind_entry, 49 49 unsigned long jump_addr,
+6 -5
arch/riscv/kernel/machine_kexec.c
··· 14 14 #include <asm/set_memory.h> /* For set_memory_x() */ 15 15 #include <linux/compiler.h> /* For unreachable() */ 16 16 #include <linux/cpu.h> /* For cpu_down() */ 17 + #include <linux/reboot.h> 17 18 18 - /** 19 + /* 19 20 * kexec_image_info - Print received image details 20 21 */ 21 22 static void ··· 40 39 } 41 40 } 42 41 43 - /** 42 + /* 44 43 * machine_kexec_prepare - Initialize kexec 45 44 * 46 45 * This function is called from do_kexec_load, when the user has ··· 101 100 } 102 101 103 102 104 - /** 103 + /* 105 104 * machine_kexec_cleanup - Cleanup any leftovers from 106 105 * machine_kexec_prepare 107 106 * ··· 136 135 #endif 137 136 } 138 137 139 - /** 138 + /* 140 139 * machine_crash_shutdown - Prepare to kexec after a kernel crash 141 140 * 142 141 * This function is called by crash_kexec just before machine_kexec ··· 152 151 pr_info("Starting crashdump kernel...\n"); 153 152 } 154 153 155 - /** 154 + /* 156 155 * machine_kexec - Jump to the loaded kimage 157 156 * 158 157 * This function is called by kernel_kexec which is called by the