Add or move inclusion guards to address violations of
MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order
to prevent the contents of a header file being included more than
once").

Inclusion guards must appear at the beginning of the headers
(comments are permitted anywhere) and the #if directive cannot
be used for other checks.

C files, if included somewhere, need to comply with the guideline.

Simone Ballarin (13):
  misra: add deviation for headers that explicitly avoid guards
  automation/eclair: add text-based deviation for empty headers
  xen/arm: address violations of MISRA C:2012 Directive 4.10
  xen/x86: address violations of MISRA C:2012 Directive 4.10
  automation/eclair: add deviation for usercopy.c
  x86/EFI: address violations of MISRA C:2012 Directive 4.10
  x86/asm: address violations of MISRA C:2012 Directive 4.10
  x86/mm: address violations of MISRA C:2012 Directive 4.10
  xen/common: address violations of MISRA C:2012 Directive 4.10
  xen/efi: address violations of MISRA C:2012 Directive 4.10
  xen/sched: address violations of MISRA C:2012 Directive 4.10
  xen: address violations of MISRA C:2012 Directive 4.10
  x86/asm: address violations of MISRA C:2012 Directive 4.10

 automation/eclair_analysis/ECLAIR/deviations.ecl | 9 +++++++++
 docs/misra/rules.rst                             | 5 ++++-
 xen/arch/arm/efi/efi-boot.h                      | 6 ++++++
 xen/arch/arm/include/asm/hypercall.h             | 6 +++---
 xen/arch/arm/include/asm/iocap.h                 | 6 +++---
 xen/arch/x86/Makefile                            | 8 ++++----
 xen/arch/x86/cpu/cpu.h                           | 5 +++++
 xen/arch/x86/efi/efi-boot.h                      | 6 ++++++
 xen/arch/x86/efi/runtime.h                       | 5 +++++
 xen/arch/x86/include/asm/compat.h                | 5 +++++
 xen/arch/x86/include/asm/cpufeatures.h           | 4 +---
 xen/arch/x86/include/asm/efibind.h               | 5 +++++
 xen/arch/x86/include/asm/hypercall.h             | 6 +++---
 xen/arch/x86/mm/guest_walk.c                     | 5 +++++
 xen/arch/x86/mm/hap/guest_walk.c                 | 4 ++++
 xen/arch/x86/physdev.c                           | 4 ++++
 xen/arch/x86/platform_hypercall.c                | 5 +++++
 xen/arch/x86/x86_64/compat/mm.c                  | 5 +++++
 xen/arch/x86/x86_64/mmconfig.h                   | 5 +++++
 xen/arch/x86/x86_emulate/private.h               | 5 +++++
 xen/arch/x86/x86_emulate/x86_emulate.c           | 5 +++++
 xen/common/compat/grant_table.c                  | 7 +++++++
 xen/common/coverage/gcc_4_7.c                    | 5 +++++
 xen/common/decompress.h                          | 5 +++++
 xen/common/efi/efi.h                             | 5 +++++
 xen/common/efi/runtime.c                         | 6 ++++++
 xen/common/event_channel.h                       | 5 +++++
 xen/common/multicall.c                           | 5 +++++
 xen/common/sched/compat.c                        | 6 ++++++
 xen/include/xen/err.h                            | 4 +++-
 xen/include/xen/pci_ids.h                        | 5 +++++
 xen/include/xen/softirq.h                        | 4 +++-
 xen/include/xen/unaligned.h                      | 7 ++++---
 xen/include/xen/vmap.h                           | 4 +++-
 xen/tools/compat-xlat-header.py                  | 2 ++
 35 files changed, 161 insertions(+), 23 deletions(-)

-- 
2.34.1


Reply via email to