All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] xen/keyhandler: add missing noreturn attribute
@ 2025-06-04 23:49 victorm.lira
  2025-06-04 23:49 ` [PATCH 2/3] xen/arm: add missing noreturn attributes victorm.lira
  2025-06-05  7:17 ` [PATCH 1/3] xen/keyhandler: add missing noreturn attribute Jan Beulich
  0 siblings, 2 replies; 10+ messages in thread
From: victorm.lira @ 2025-06-04 23:49 UTC (permalink / raw)
  To: xen-devel
  Cc: Nicola Vetrini, Victor Lira, Andrew Cooper, Anthony PERARD,
	Michal Orzel, Jan Beulich, Julien Grall,
	Roger Pau Monné, Stefano Stabellini, Federico Serafini,
	Bertrand Marquis

From: Nicola Vetrini <nicola.vetrini@bugseng.com>

Function `reboot_machine' does not return, but lacks the `noreturn' attribute,
therefore causing a violation of MISRA C Rule 2.1: "A project shall not contain
unreachable code".

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Signed-off-by: Victor Lira <victorm.lira@amd.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Anthony PERARD <anthony.perard@vates.tech>
Cc: Michal Orzel <michal.orzel@amd.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien@xen.org>
Cc: Roger Pau Monné <roger.pau@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Nicola Vetrini <nicola.vetrini@bugseng.com>
Cc: Federico Serafini <federico.serafini@bugseng.com>
Cc: Bertrand Marquis <bertrand.marquis@arm.com>
---

 xen/common/keyhandler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 0bb842ec00..b0a2051408 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -251,7 +251,7 @@ static void cf_check dump_hwdom_registers(unsigned char key)
     }
 }

-static void cf_check reboot_machine(unsigned char key, bool unused)
+static void noreturn cf_check reboot_machine(unsigned char key, bool unused)
 {
     printk("'%c' pressed -> rebooting machine\n", key);
     machine_restart(0);
--
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-06-06  6:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-04 23:49 [PATCH 1/3] xen/keyhandler: add missing noreturn attribute victorm.lira
2025-06-04 23:49 ` [PATCH 2/3] xen/arm: add missing noreturn attributes victorm.lira
2025-06-04 23:49   ` [PATCH 3/3] xen/x86: " victorm.lira
2025-06-05  7:24     ` Jan Beulich
2025-06-05  7:17 ` [PATCH 1/3] xen/keyhandler: add missing noreturn attribute Jan Beulich
2025-06-05 12:22   ` Nicola Vetrini
2025-06-05 12:26     ` Nicola Vetrini
2025-06-05 13:27       ` Jan Beulich
2025-06-06  0:09         ` Stefano Stabellini
2025-06-06  6:47           ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.