misra: add missing noreturn attribute for __div0()

The __div0() function never returns to its caller, causing a violation
of MISRA C Rule 2.1: "A project shall not contain unreachable code".
Add the `noreturn` attribute to fix this.

Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Dmytro Prokopchuk1 authored and Stefano Stabellini committed 2025-08-15 12:37:18 -07:00
1 parent 528efc7b6a
commit 268e818bf1
1 file changed
+1 -1
+1 -1
View File
@@ -172,7 +172,7 @@ void init_traps(void)
isb();
}
void asmlinkage __div0(void)
void asmlinkage noreturn __div0(void)
{
printk("Division by zero in hypervisor.\n");
BUG();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.