Re: [PATCH 06/12] kexec: machine_reboot_kexec() doesn't return
Nicola Vetrini <[email protected]>
| Newsgroups | gmane.comp.emulators.xen.devel |
|---|---|
| Organization | BUGSENG s.r.l. |
| Message-ID | <[email protected]> |
On 2026-08-28 09:02, Jan Beulich wrote: > 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 <[email protected]> > Reviewed-by: Nicola Vetrini <[email protected]> > --- a/xen/common/kexec.c > +++ b/xen/common/kexec.c > @@ -401,7 +401,7 @@ void kexec_crash(enum crash_reason reaso > 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 * > > kexec_common_shutdown(); > machine_reboot_kexec(image); > - > - BUG(); > - return 0; > } > > static void cf_check do_crashdump_trigger(unsigned char key) > --- a/xen/include/xen/kexec.h > +++ b/xen/include/xen/kexec.h > @@ -48,7 +48,7 @@ int machine_kexec_add_page(struct kexec_ > 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); -- Nicola Vetrini, B.Sc. Software Engineer BUGSENG (https://bugseng.com) LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253