[XEN PATCH v2 0/3] xen: fix inclusions and static storage duration

Nicola Vetrini posted 3 patches 8 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1692275359.git.nicola.vetrini@bugseng.com
xen/arch/arm/include/asm/vm_event.h |  1 -
xen/arch/arm/vm_event.c             |  2 +-
xen/arch/x86/include/asm/setup.h    |  6 ------
xen/arch/x86/platform_hypercall.c   |  2 +-
xen/arch/x86/pv/dom0_build.c        |  2 +-
xen/arch/x86/vm_event.c             |  2 +-
xen/drivers/video/vga.c             |  8 --------
xen/drivers/vpci/msix.c             |  2 +-
xen/include/xen/console.h           |  2 --
xen/include/xen/vga.h               | 16 ++++++++++++++++
xen/include/xen/vm_event.h          |  1 +
11 files changed, 22 insertions(+), 22 deletions(-)
[XEN PATCH v2 0/3] xen: fix inclusions and static storage duration
Posted by Nicola Vetrini 8 months, 2 weeks ago
The files touched by this series contain function or variable definitions with
no prior declaration visible, because it's inside an header that is not included
or it's not present anywhere. This is a risk in itself, but also violates
MISRA C:2012 Rule 8.4, which states the following:
"A compatible declaration shall be visible when an object or function with
external linkage is defined".

The resolution strategies are as follows:

1. make the functions/variables static
2. include the header that contains the compatible declaration

No functional change.

Additional notes:
- This series is a continuation of the work done here [1], so the same additional
  notes apply.

[1] https://lore.kernel.org/xen-devel/cover.1691655814.git.nicola.vetrini@bugseng.com/T/#m28da1b5ef8d9a7683937bfc345765e3438b89977

Changes in v2:
- Addressed review comments on the leftover patches
- Patches 1,2,4 from the previous version have already been committed

Nicola Vetrini (3):
  vm_event: rework inclusions to use arch-indipendent header
  vpci/msix: make 'get_slot' static
  drivers/video: make declarations of defined functions available

 xen/arch/arm/include/asm/vm_event.h |  1 -
 xen/arch/arm/vm_event.c             |  2 +-
 xen/arch/x86/include/asm/setup.h    |  6 ------
 xen/arch/x86/platform_hypercall.c   |  2 +-
 xen/arch/x86/pv/dom0_build.c        |  2 +-
 xen/arch/x86/vm_event.c             |  2 +-
 xen/drivers/video/vga.c             |  8 --------
 xen/drivers/vpci/msix.c             |  2 +-
 xen/include/xen/console.h           |  2 --
 xen/include/xen/vga.h               | 16 ++++++++++++++++
 xen/include/xen/vm_event.h          |  1 +
 11 files changed, 22 insertions(+), 22 deletions(-)

--
2.34.1