fix missing headers and static storage duration
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest7 patches 3 repliesIn review
Changes in v2 from the cover letter
- Modified commit messages, with additional "Fixed" tags and mention that these are bugfixes
- Split patch 4/8 of the previous version
- Drop patch 7/8 of the previous version, because it's already addressed by this patch [1]
[1] https://lists.xen.org/archives/html/xen-devel/2023-05/msg00896.html
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | xen/memory: make 'ioreq_server_max_frames' staticxen/ | +1 | 1 reply | |
| 2/7 | xen: make 'saved_cmdline' staticxen/ | +1 | 0 replies | |
| 3/7 | xen/include: make a declaration of 'get_sec' visible where neededxen/ xen/ | +2 | 1 reply | |
| 4/7 | xen/arm: make declarations visible before function definitionsxen/ xen/ | +2 | 0 replies | |
| 5/7 | x86: make some functions and variables static rather than externxen/ xen/ xen/ +2 more | +6 | 1 reply | |
| 6/7 | xen/arm: mm: add missing extern variable declarationxen/ | +3 | 0 replies | |
| 7/7 | x86/nmi: include missing header with declarations for 'watchdog_*'xen/ | +1 | 0 replies |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Luca Fancellu | Stefano Stabellini | Jan Beulich |
|---|---|---|---|
| 1/7 | R-b | A-b | |
| 2/7 | R-b | R-b | |
| 3/7 | R-b | ||
| 4/7 | R-b | ||
| 5/7 | R-b | ||
| 6/7 | R-b | R-b | |
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [XEN PATCH v2 0/7] fix missing headers and static storage duration
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, 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.
---
Changes in v2:
- Modified commit messages, with additional "Fixed" tags and mention that these are bugfixes
- Split patch 4/8 of the previous version
- Drop patch 7/8 of the previous version, because it's already addressed by this patch [1]
[1] https://lists.xen.org/archives/html/xen-devel/2023-05/msg00896.html
Nicola Vetrini (7):
xen/memory: make 'ioreq_server_max_frames' static
xen: make 'saved_cmdline' static
xen/include: make a declaration of 'get_sec' visible where needed xen/arm: make declarations visible before function definitions
x86: make some functions and variables static rather than extern xen/arm: mm: add missing extern variable declaration x86/nmi: include missing header with declarations for 'watchdog_*'
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/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 + 12 files changed, 16 insertions(+), 10 deletions(-)
--
2.34.1