mbox series

[XEN,0/8] xen: address MISRA C:2012 Rule 8.4

Message ID cover.1691575243.git.nicola.vetrini@bugseng.com (mailing list archive)
Headers show
Series xen: address MISRA C:2012 Rule 8.4 | expand

Message

Nicola Vetrini Aug. 9, 2023, 11:02 a.m. UTC
Rule states the following:
"A compatible declaration shall be visible when an object or function with
external linkage is defined".

This series deals with violations concerning functions and variables used by C
code (thus not used only within asm). The resolution strategies are as follows:

1. make the functions/variables static
2. include the header that contains the compatible declaration, or add one in
   the header if that's not the case.

No functional change.

Additional notes:
- other cases, such as functions/variables used only in asm code will be possibly
  dealt with in future patches.
- functions in 'gcov_base.c' are deviated, since they are called only from code
  generated by gcc in a particular non-release build configuration;
- variables in 'xen/include/acpi/acglobal.h' are deviated temporarily, since
  it's uncertain whether modifying the include pattern to be compliant with the
	rule would introduce subtle bugs.

Nicola Vetrini (8):
  arm/efi: address MISRA C:2012 Rule 8.4
  xen/memory: address MISRA C:2012 Rule 8.4
  xen: address MISRA C:2012 Rule 8.4
  xen/arm: address MISRA C:2012 Rule 8.4
  x86: address MISRA C:2012 Rule 8.4
  xen/arm: mm: address MISRA C:2012 Rule 8.4
  x86/i8259: address MISRA C:2012 Rule 8.4
  x86/nmi: address MISRA C:2012 Rule 8.4

 xen/arch/arm/efi/efi-boot.h       | 2 +-
 xen/arch/arm/include/asm/mm.h     | 3 +++
 xen/arch/arm/setup.c              | 1 +
 xen/arch/arm/time.c               | 1 +
 xen/arch/x86/cpu/mcheck/mce.c     | 2 +-
 xen/arch/x86/cpu/mcheck/mce_amd.c | 2 +-
 xen/arch/x86/cpu/microcode/core.c | 2 +-
 xen/arch/x86/i8259.c              | 1 +
 xen/arch/x86/nmi.c                | 3 ++-
 xen/arch/x86/spec_ctrl.c          | 4 ++--
 xen/common/kernel.c               | 2 +-
 xen/common/memory.c               | 2 +-
 xen/include/xen/cper.h            | 3 +--
 xen/include/xen/time.h            | 1 +
 14 files changed, 18 insertions(+), 11 deletions(-)

--
2.34.1