Commit Graph
7 Commits
Author SHA1 Message Date
Nicola Vetrini 1427b904d2 xen/xsm: address violations of MISRA C rules 8.3 and 7.2
Rule 8.3 states: Function types shall be in prototype form
with named parameters.

add parameter to 'has_xsm_magic' to make it consistent with the
definition.

Rule 7.2 states: A `u' or `U' suffix shall be applied to all
integer constants that are represented in an unsigned type.

add missing `U' to both #define for `XSM_MAGIC` for consistency.

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@gmail.com>
Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
2025-11-26 12:08:17 +01:00
Nicola Vetrini 7d5e0fac53 xen/param: address violation of MISRA C Rule 8.2
Add missing parameter name in function pointer member declaration.

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2025-11-25 10:24:00 +01:00
Nicola Vetrini c7376ee322 xen/param: address violation of MISRA C Rule 20.7
The rule states: Expressions resulting from the expansion of
macro parameters shall be enclosed in parentheses.

Add parentheses in the defition of `custom_runtime_var_sz' to
address the violations.

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2025-11-25 10:23:11 +01:00
Nicola Vetrini 1f02168eeb xen/sched: address violation of MISRA C Rule 16.3
The rule states: An unconditional `break' statement shall terminate
every switch-clause.

Use the `fallthrough' pseudo-keyword for which an ECLAIR deviation
is already in place.

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@gmail.com>
Acked-by: Juergen Gross <jgross@suse.com>
2025-11-24 11:34:30 +01:00
Nicola Vetrini b979189a67 xen/macros: Drop alternative definition of BUILD_BUG_ON(_ZERO)? for old GCC
The toolchain baseline for GCC is 5.1, which supports _Static_assert
in c99 mode

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@gmail.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2025-08-14 11:36:44 +02:00
Nicola Vetrini 900d422775 xen/compiler: drop alternative unreachable() definition for older GCC
The GCC baseline version is 5.1, which supports __builtin_unreachable(),
therefore the alternative definition can be dropped

Signed-off-by: Nicola Vetrini <nicola.vetrini@gmail.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2025-08-14 11:36:27 +02:00
Nicola Vetrini e4a0420627 xen: Drop logic for old clang versions
The enforced toolchain baseline for clang is version 11,
therefore this logic is effectively dead code.

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@gmail.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
2025-08-12 11:40:28 +02:00