|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] kexec: machine_reboot_kexec() doesn't return
commit 4d2ed2f88a0c9e43627326bd7687e4fce55b6a39
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Oct 6 08:13:03 2026 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Oct 6 08:13:03 2026 +0200
kexec: machine_reboot_kexec() doesn't return
Mark it as such, and then remove the code following at its sole call site,
for Eclair flagging that as a Misra rule 2.1 (unreachable code) violation.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/common/kexec.c | 5 +----
xen/include/xen/kexec.h | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 7535d269e8..8ccaef1e02 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -401,7 +401,7 @@ void kexec_crash(enum crash_reason reason)
BUG();
}
-static long cf_check kexec_reboot(void *_image)
+static long noreturn cf_check kexec_reboot(void *_image)
{
struct kexec_image *image = _image;
@@ -409,9 +409,6 @@ static long cf_check kexec_reboot(void *_image)
kexec_common_shutdown();
machine_reboot_kexec(image);
-
- BUG();
- return 0;
}
static void cf_check do_crashdump_trigger(unsigned char key)
diff --git a/xen/include/xen/kexec.h b/xen/include/xen/kexec.h
index 641d8656fe..e0d793b043 100644
--- a/xen/include/xen/kexec.h
+++ b/xen/include/xen/kexec.h
@@ -48,7 +48,7 @@ int machine_kexec_add_page(struct kexec_image *image,
unsigned long vaddr,
int machine_kexec_load(struct kexec_image *image);
void machine_kexec_unload(struct kexec_image *image);
void machine_kexec_reserved(xen_kexec_reserve_t *reservation);
-void machine_reboot_kexec(struct kexec_image *image);
+void noreturn machine_reboot_kexec(struct kexec_image *image);
void machine_kexec(struct kexec_image *image);
void kexec_crash(enum crash_reason reason);
void kexec_crash_save_cpu(void);
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |