The statements after a call to the noreturn function 'do_unexpected_trap'
can't be reached, thus violating MISRA C:2012 Rule 2.1
("A project shall not contain unreachable code.").
ASSERT_UNREACHABLE() is used to signal that the unreachable break-s are used as
a defensive coding measure to prevent inadvertent fallthrough.
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
case HSR_EC_SVE:
/* An SVE exception is a bug somewhere in hypervisor code */
do_unexpected_trap("SVE trap at EL2", regs);
+ ASSERT_UNREACHABLE();
break;
#endif
case HSR_EC_DATA_ABORT_CURR_EL:
dump_hyp_walk(get_hfar(is_data));
do_unexpected_trap(fault, regs);
-
+ ASSERT_UNREACHABLE();
break;
}
default: