altp2m: address Misra 2.1 rule violation

The stub altp2m_vcpu_idx() is recognized as "noreturn" function lacking
respective annotation (or having a return statement), which hence is deemed
unreachable code by Misra / Eclair. All call sites are guarded by
altp2m_active() checks, hence an inline function isn't needed. A
declaration will suffice, with call sites then getting DCE-d.

No functional change.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Jan Beulich committed 2026-09-01 09:59:12 +02:00
1 parent a1435a677c
commit f35d7e08ce
1 file changed
+2 -7
+2 -7
View File
@@ -14,13 +14,8 @@ static inline bool altp2m_active(const struct domain *d)
return false;
}
/* Alternate p2m VCPU */
static inline unsigned int altp2m_vcpu_idx(const struct vcpu *v)
{
/* Not implemented on GENERIC, should not be reached. */
BUG();
return 0;
}
/* Alternate p2m VCPU - placeholder on GENERIC */
unsigned int altp2m_vcpu_idx(const struct vcpu *v);
#endif /* __ASM_GENERIC_ALTP2M_H */
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.