functional change.
Signed-off-by: Nicola Vetrini
---
A couple of remarks:
- An inline function is another possible encapsulation technique
- A #define wrapper() do { asm volatile (...) } while(0); is also allowed,
but I don't think this is needed in the specific case.
---
xen/arch/arm/arm64/
On 17/08/2023 14:39, Nicola Vetrini wrote:
The function can become static since it's used only within this file.
This also resolves a violation of MISRA C:2012 Rule 8.4 due to the
absence
of a declaration before the function definition.
Fixes: b177892d2d0e ("vpci/msix: handle acc
y: the one provided is just a
basic skeleton that should be tailored to the project.
Nicola Vetrini (3):
docs/misra: add documentation for MISRA C:2012 Dir 4.1
docs: make the docs for MISRA C:2012 Dir 4.1 visible to ECLAIR
automation/eclair: build docs/misra to address MISRA C:2012 Dir 4.1
The documentation pertaining Directive 4.1 is contained in docs/misra.
The build script driving the analysis is amended to allow ECLAIR to
find it and thus resolving violations of the directive.
Signed-off-by: Nicola Vetrini
---
automation/eclair_analysis/build.sh | 10 --
automation
-by: Nicola Vetrini
---
docs/Makefile | 7 ++-
docs/misra/Makefile | 36
2 files changed, 42 insertions(+), 1 deletion(-)
create mode 100644 docs/misra/Makefile
diff --git a/docs/Makefile b/docs/Makefile
index 966a104490ac..ff991a0c3ca2 100644
--- a/docs
The aforementioned directive requires the project to supply documentation
on the measures taken towards the minimization of run-time failures.
The 'rules.rst' file is updated accordingly to mention the newly
added documentation.
Signed-off-by: Nicola Vetrini
---
docs/misra/C-runtime
/rules.rst and other docs. Please send out to me a list of
deviations/configurations and I'll make sure to reflect them under
docs/misra so that they are in sync.
Cheers,
Stefano
Sure, I'll let you know when I have it.
Thanks,
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https
I guess I can make a standalone patch with this modification
if the other patches of this series go in as is.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
On 17/08/2023 15:28, Jan Beulich wrote:
On 17.08.2023 14:39, Nicola Vetrini wrote:
--- a/xen/include/xen/vga.h
+++ b/xen/include/xen/vga.h
@@ -15,4 +15,20 @@
extern struct xen_vga_console_info vga_console_info;
#endif
+int fill_console_start_info(struct dom0_vga_console_info *);
+
+#ifdef
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 -
xe
The function can become static since it's used only within this file.
This also resolves a violation of MISRA C:2012 Rule 8.4 due to the absence
of a declaration before the function definition.
Fixes: b177892d2d0e ("vpci/msix: handle accesses adjacent to the MSI-X table")
Signed-off-
when
defining functions in 'xen/arch/x86/vm_event.c'
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- Include the arch-specific header in the common one, and only include
the latter in source files.
The following functions have been mainly touched by the following commits,
but the present
violations of MISRA C:2012 Rule 8.4.
Fixes: 6d9199bd0f22 ("x86-64: enable hypervisor output on VESA frame buffer")
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- Moved fill_console_start_info to vga.h
(21bee1787021 introduced this function)
---
xen/arch/x86/include/asm/setup.h | 6 -
On 16/08/2023 17:28, Julien Grall wrote:
On 16/08/2023 16:18, Nicola Vetrini wrote:
Hi,
Hi,
the function mentioned in the subject, defined in
'xen/arch/arm/traps.c' seems to have no
caller (either from C code or from asm code), so I think it can be
safely removed, unless
there's a reason
On 16/08/2023 21:41, Stefano Stabellini wrote:
On Wed, 16 Aug 2023, Nicola Vetrini wrote:
Hi,
it has been agreed during past MISRA meetings that Directive 4.1
("Run-time failures shall be minimized") shall be dealt with by
documenting
how in Xen such runtime failures are pre
ropriately.
As a side note, the directive should be added to docs/misra/rules.rst.
It can be part of
the patch addressing the violations, tough.
[1]
https://github.com/BUGSENG/eclair_demo/blob/main/ECLAIR/MISRA_C_2012_doc.h
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
Hi,
the function mentioned in the subject, defined in 'xen/arch/arm/traps.c'
seems to have no
caller (either from C code or from asm code), so I think it can be
safely removed, unless
there's a reason for it to remain in Xen.
Regards,
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl
On 16/08/2023 13:23, Jan Beulich wrote:
On 16.08.2023 12:47, Nicola Vetrini wrote:
On 16/08/2023 12:31, Jan Beulich wrote:
On 16.08.2023 12:01, Nicola Vetrini wrote:
On 08/08/2023 11:03, Nicola Vetrini wrote:
On 04/08/2023 08:42, Jan Beulich wrote:
On 04.08.2023 01:50, Stefano Stabellini
On 16/08/2023 12:31, Jan Beulich wrote:
On 16.08.2023 12:01, Nicola Vetrini wrote:
Hi,
On 08/08/2023 11:03, Nicola Vetrini wrote:
On 04/08/2023 08:42, Jan Beulich wrote:
On 04.08.2023 01:50, Stefano Stabellini wrote:
On Thu, 3 Aug 2023, Jan Beulich wrote:
On 02.08.2023 16:38, Nicola
Hi,
On 08/08/2023 11:03, Nicola Vetrini wrote:
On 04/08/2023 08:42, Jan Beulich wrote:
On 04.08.2023 01:50, Stefano Stabellini wrote:
On Thu, 3 Aug 2023, Jan Beulich wrote:
On 02.08.2023 16:38, Nicola Vetrini wrote:
Rule 2.1 states: "A project shall not contain unreachable
CC-ing the missing maintainers here, both from x86 and vm_event
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
Hi,
On 14/08/2023 13:01, Julien Grall wrote:
Hi,
On 14/08/2023 11:33, Nicola Vetrini wrote:
On 14/08/2023 09:39, Jan Beulich wrote:
On 11.08.2023 09:19, Nicola Vetrini wrote:
The missing header included by this patch provides declarations for
the functions
'vm_event_{fill_regs
On 14/08/2023 09:39, Jan Beulich wrote:
On 11.08.2023 09:19, Nicola Vetrini wrote:
The missing header included by this patch provides declarations for
the functions
'vm_event_{fill_regs,set_registers,monitor_next_interrupt}'
that are defined in the source file. This also resolves violations
On 14/08/2023 10:12, Jan Beulich wrote:
On 14.08.2023 09:56, Nicola Vetrini wrote:
On 14/08/2023 09:47, Jan Beulich wrote:
On 11.08.2023 09:19, Nicola Vetrini wrote:
--- a/xen/drivers/video/vga.c
+++ b/xen/drivers/video/vga.c
@@ -9,6 +9,7 @@
#include
#include
#include
+#include
xen
' as a parameter, which is defined in the same file
as the function, thus it does not need that parameter, which is a cause
of shadowing, as explained above.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- Mention 'kexec_reserve_area' in the commit message.
Other occurrences of shadowing on the same
The function has no uses in the codebase, and can be removed.
This also avoids the violation of MISRA C:2012 Rule 8.4 and Rule 2.1
because it has no declaration and the function's code is unreachable.
Suggested-by: Julien Grall
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- Modified commit
On 14/08/2023 09:47, Jan Beulich wrote:
On 11.08.2023 09:19, Nicola Vetrini wrote:
--- a/xen/drivers/video/vga.c
+++ b/xen/drivers/video/vga.c
@@ -9,6 +9,7 @@
#include
#include
#include
+#include
xen/vga.h, which you move the declarations to, is already included
here.
Why the need
On 14/08/2023 09:44, Jan Beulich wrote:
On 11.08.2023 09:19, Nicola Vetrini wrote:
The function can become static since it's used only within this file.
This also resolves a violation of MISRA C:2012 Rule 8.4 due to the
absence
of a declaration before the function definition.
Signed-off
Signed-off-by: Nicola Vetrini
Fixes: 3eab82196b02 ("x86: PIT broadcast to fix local APIC timer stop
issue for Deep C state")
Fixes: 63dc135aeaf9 ("x86: invpcid support")
One request: Please can you get used to putting the Fixes: tags first,
so one doesn't need to (try
, as done in the patch?
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
/s8/int8_t/.
Signed-off-by: Nicola Vetrini
Fixes: 3eab82196b02 ("x86: PIT broadcast to fix local APIC timer stop issue for
Deep C state")
Fixes: 63dc135aeaf9 ("x86: invpcid support")
---
xen/arch/x86/setup.c | 4 +++-
xen/include/xen/cpuidle.h | 2 +-
2 files changed
The missing header included by this patch provides a declaration for
'set_px_pminfo' that is visible prior to the definition in this file.
This also resolves a violation of MISRA C:2012 Rule 8.4.
Signed-off-by: Nicola Vetrini
Fixes: 452119c09420 ("x86 and ia64: move cpufreq notify
t the case.
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.vetr...@bugseng.com/T/#m28da1b5ef8d9a7683937bfc345765e3438b89977
Nicola Vetrini (6):
The function can become static since it's used only within this file.
This also resolves a violation of MISRA C:2012 Rule 8.4 due to the absence
of a declaration before the function definition.
Signed-off-by: Nicola Vetrini
Fixes: b177892d2d0e ("vpci/msix: handle accesses adjacent to the
Signed-off-by: Nicola Vetrini
Fixes: ebb26b509f1a ("xen/x86: make VGA support selectable")
Fixes: 6d9199bd0f22 ("x86-64: enable hypervisor output on VESA frame buffer")
---
xen/arch/x86/include/asm/setup.h | 6 --
xen/drivers/video/vga.c | 9 +
xen/inc
The missing header included by this patch provides declarations for
the functions 'vm_event_{fill_regs,set_registers,monitor_next_interrupt}'
that are defined in the source file. This also resolves violations
of MISRA C:2012 Rule 8.4.
Signed-off-by: Nicola Vetrini
Fixes: adc75eba8b15 (&quo
The variable is only ever used inside the file where it's
defined, therefore it can have static storage. This also
resolves a violation of MISRA C:2012 Rule 8.4 due to the absence
of a declaration prior to the definition.
Signed-off-by: Nicola Vetrini
Fixes: 3ba523ff957c ("CPUIDLE: enabl
both are defined in the same file (mentioned above).
This in turn causes several other functions to lose their parameter
'e820' because they are involved in the call chain that leads to
'e820_add_range'.
Signed-off-by: Nicola Vetrini
---
Other occurrences of shadowing on the same global
On 09/08/2023 14:45, Jan Beulich wrote:
On 09.08.2023 09:55, Nicola Vetrini wrote:
The local variables 'irq_desc' shadow the homonymous global variable,
declared in 'xen/arch/x86/include/asm/irq.h', therefore they are
renamed
'irqd' for consistency.
Perhaps with "for consistency&quo
On 10/08/2023 11:29, Nicola Vetrini wrote:
The function in question has no callers and its removal has already
been proposed (and acked) as part of this larger series [1].
There have been further bugfixes to that function [2], but they do not
add
any caller, hence it can be removed.
[1
-27-git-send-email-julien.gr...@linaro.org/
[2] https://lore.kernel.org/xen-devel/20160720161017.4508-1-...@galois.com/
Signed-off-by: Nicola Vetrini
Suggested-by: Julien Grall
---
xen/arch/arm/traps.c | 57
1 file changed, 57 deletions(-)
diff --git
Add a declaration for the variable 'init_ttbr' to resolve
the violation of Rule 8.4 present the relative source file 'mm.c'.
No functional changes.
Signed-off-by: Nicola Vetrini
Fixes: 4557c2292854 ("xen: arm: rewrite start of day page table and cpu bring
up")
Reviewed-by: Luc
The variable 'saved_cmdline' can be defined static,
as its only uses are within the same file. This in turn avoids
violating Rule 8.4 because no declaration is present.
Signed-off-by: Nicola Vetrini
Fixes: e6ee01ad24b6 ("xen/version: Drop compat/kernel.c")
Reviewed-by: Luca Fancellu
The functions and variables touched by this commit can be static,
as they are only used within the same unit. This in turn addresses
the absence of declarations that violates Rule 8.4.
Signed-off-by: Nicola Vetrini
Fixes: 741367e77d6c ("mce: Clean-up mcheck_init handler")
Fixes: 45
'xen/hypercall.h' is included in 'xen/arch/arm/setup.c' to allow
the declaration of 'arch_get_xen_caps' to be visible when
defining the function.
The header 'xen/delay.h' is included in 'xen/arch/arm/time.c'
to allow the declaration of 'udelay' to be visible.
Signed-off-by: Nicola Vetrini
Fixes
Include an additional header to make the declarations for
functions 'watchdog_*' visible prior to their definition in
the file, thereby resolving the violations of Rule 8.4.
No functional change.
Signed-off-by: Nicola Vetrini
Fixes: c8177e691f0f ("watchdog: Move watchdog from being x86 spe
ot; 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_
The function 'ioreq_server_max_frames' can be defined static,
as its only uses are within the same file. This in turn avoids
violating Rule 8.4 because no declaration is present.
No functional change.
Signed-off-by: Nicola Vetrini
Fixes: 9244528955de ("xen/memory: Fix acquire_resource
A declaration for 'get_sec' is added in 'xen/include/xen/time.h' to
be available for every call site (in particular 'cper.h').
This also resolves a violation of MISRA C:2012 Rule 8.4.
Signed-off-by: Nicola Vetrini
Fixes: c8cb30cfc87a ("mce: Provide ERST interface")
---
Changes in v2:
On 09/08/2023 14:52, Jan Beulich wrote:
On 09.08.2023 13:02, Nicola Vetrini wrote:
The additional header file makes the declaration for the function
'init_IRQ', defined in this file visible, thereby resolving the
violation of Rule 8.4.
No functional change.
Signed-off-by: Nicola Vetrini
On 09/08/2023 15:50, Luca Fancellu wrote:
On 9 Aug 2023, at 12:02, Nicola Vetrini
wrote:
The variable 'saved_cmdline' can be defined static,
as its only uses are within the same file. This in turn avoids
violating Rule 8.4 because no declaration is present.
Signed-off-by: Nicola Vetrini
On 09/08/2023 15:56, Luca Fancellu wrote:
On 9 Aug 2023, at 08:55, Nicola Vetrini
wrote:
The variable 'msec' declared in the macro shadows the local
variable in 'ehci_dbgp_bios_handoff', but to prevent any
future clashes with other functions the macro is converted to
a static inline function
To prevent back and forth I would suggest also to have a look in
sending-patches.pandoc,
### Fixes section, on the expected syntax for the tag
Thanks
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
On 09/08/2023 14:42, Jan Beulich wrote:
On 09.08.2023 13:02, Nicola Vetrini wrote:
'xen/hypercall.h' is included in 'xen/arch/arm/setup.c' to allow
the declaration of 'arch_get_xen_caps' to be visible when
defining the function.
The header 'xen/delay.h' is included in 'xen/arch/arm/time.c
the function 'fdt_add_uefi_nodes' can be defined static, as its
only callers are within the same file. This in turn avoids
violating Rule 8.4 because no declaration is present.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/arm/efi/efi-boot.h | 2 +-
1 file changed, 1
The additional header file makes the declaration for the function
'init_IRQ', defined in this file visible, thereby resolving the
violation of Rule 8.4.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/i8259.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/x86
Include an additional header to make the declarations for
functions 'watchdog_*' visible prior to their definition in
the file, thereby resolving the violations of Rule 8.4.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/nmi.c | 1 +
1 file changed, 1 insertion(+)
diff
The functions and variables touched by this commit can be static,
as they are only used within the same unit. This in turn addresses
the absence of declarations that violates Rule 8.4.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/cpu/mcheck/mce.c | 2 +-
xen/arch/x86/cpu/mcheck/mce_amd.c
Add a declaration for the variable 'init_ttbr' to resolve
the violation of Rule 8.4 present in the associated source file 'mm.c'.
No functional changes.
Signed-off-by: Nicola Vetrini
---
xen/arch/arm/include/asm/mm.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xen/arch/arm/include
de 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: m
for 'get_sec' is added in
'xen/include/xen/time.h' to be available for every call site
(in particular cper.h).
Signed-off-by: Nicola Vetrini
---
xen/arch/arm/setup.c | 1 +
xen/arch/arm/time.c| 1 +
xen/include/xen/cper.h | 3 +--
xen/include/xen/time.h | 1 +
4 files changed, 4 insertions
The function 'ioreq_server_max_frames' can be defined static,
as its only uses are within the same file. This in turn avoids
violating Rule 8.4 because no declaration is present.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/common/memory.c | 2 +-
1 file changed, 1 insertion
The variable 'saved_cmdline' can be defined static,
as its only uses are within the same file. This in turn avoids
violating Rule 8.4 because no declaration is present.
Signed-off-by: Nicola Vetrini
---
xen/common/kernel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen
://lore.kernel.org/xen-devel/cover.1691492441.git.nicola.vetr...@bugseng.com/
[2]
https://lore.kernel.org/xen-devel/cover.1691488505.git.nicola.vetr...@bugseng.com/
Nicola Vetrini (2):
x86/vmsi: rename variables to address MISRA C:2012 Rule 5.3
xen/delay: address MISRA C:2012 Rule 5.3.
xen/arch
The local variables 'irq_desc' shadow the homonymous global variable,
declared in 'xen/arch/x86/include/asm/irq.h', therefore they are renamed
'irqd' for consistency.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/hvm/vmsi.c | 22 +++---
1 file changed, 11 insertions(+), 11
The variable 'msec' declared in the macro shadows the local
variable in 'ehci_dbgp_bios_handoff', but to prevent any
future clashes with other functions the macro is converted to
a static inline function.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/xen/delay.h | 8
On 08/08/2023 15:46, Jan Beulich wrote:
On 08.08.2023 13:08, Nicola Vetrini wrote:
--- a/xen/arch/x86/e820.c
+++ b/xen/arch/x86/e820.c
@@ -543,27 +543,27 @@ static void __init
machine_specific_memory_setup(struct e820map *raw)
clip_to_limit(top_of_ram, "MTRRs do not cove
at break should indeed go away.
However, the main thing that's holding me back from doing a slimmed-down
v2 here is that
evidently there's no consensus even on the ASSERT_UNREACHABLE() patches.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
l go for the latter (it's quicker) as a separate patch, since
hopefully the other patch
in the series can go in unmodified.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
On 08/08/2023 15:22, Jan Beulich wrote:
On 08.08.2023 14:22, Nicola Vetrini wrote:
The local variables 'irq_desc' shadow the homonymous global variable,
declared in 'xen/arch/x86/include/asm/irq.h', therefore they are
renamed
'irqd' for consistency with ARM code. Other variables of the same
uched by this commit.
No functional changes.
Signed-off-by: Nicola Vetrini
Reviewed-by: Stefano Stabellini
---
Changes in v2:
- Clarified commit message
As mentioned in the preivious iteration's thread:
the declaration itself is a scope and shadowing can happen, as in:
int x;
void f(int x, int arr[x]
This series is the part of series [1] that needed further adjustments. The first
two patches of that series are already committed.
The changes in this version are detailed in the individual commit messages.
[1] https://lists.xenproject.org/archives/html/xen-devel/2023-08/msg00492.html
Nicola
The local variables 'irq_desc' shadow the homonymous global variable,
declared in 'xen/arch/x86/include/asm/irq.h', therefore they are renamed
'irqd' for consistency with ARM code. Other variables of the same type
in the file are also renamed 'irqd' for consistency.
Signed-off-by: Nicola Vetrini
On 08/08/2023 13:08, Nicola Vetrini wrote:
The macros defined 'xen/include/public/arch-x86/xen-mca.h' are revised
to address the following concerns:
- needless underscore prefixes for parameter names;
- the variable 'i' in function 'mce_action' that is shadowed
by the local variable
Variable 'mpc_default_type' in 'xen/arch/x86/include/asm/mpspec.h'
has no uses and causes shadowing with function parameter names
in 'mpparse.c'. Therefore, it is removed.
No functional changes.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- Removed the variable.
---
xen/arch/x86/include
to resolve present shadowing
issues, which violate MISRA C:2012 Rule 5.3, and lessen the
probability of future ones with some renames.
No functional change.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- Added missing parentheses.
- Clarified commit message.
---
xen/include/public/arch-x86/xen-mca.h
Rename the local variables s/xsave/xstate/ to avoid clashing
with function 'xsave' defined in 'xen/arch/x86/include/asm/xstate.h'.
No functional changes.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- s/xsave_area/xstate/, since that is the newest common name, also
used in other parts
visible from their definitions in 'e820.c'.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- Reworked the patch to remove the parameter e820 where possible
and consequential changes to the involved functions.
---
xen/arch/x86/e820.c | 36 ++---
xen/arch
The variable 'msec' declared in the macro shadows the local
variable in 'ehci_dbgp_bios_handoff', but to prevent any
future clashes with other functions the macro is converted to
a static inline function.
No functional change.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- Switched
--
Changes in v2:
- Addressed numerous review comments
- Dropped patch 2/6 [2], as that has already been committed
[1] https://lists.xenproject.org/archives/html/xen-devel/2023-08/msg00538.html
[2] https://lists.xenproject.org/archives/html/xen-devel/2023-08/msg00539.html
Nicola Vetrini (5):
x8
On 04/08/2023 08:42, Jan Beulich wrote:
On 04.08.2023 01:50, Stefano Stabellini wrote:
On Thu, 3 Aug 2023, Jan Beulich wrote:
On 02.08.2023 16:38, Nicola Vetrini wrote:
Rule 2.1 states: "A project shall not contain unreachable code".
The functions
- machine_halt
- ma
On 07/08/2023 11:10, Jan Beulich wrote:
On 07.08.2023 10:59, Nicola Vetrini wrote:
On 07/08/2023 10:09, Jan Beulich wrote:
On 04.08.2023 17:27, Nicola Vetrini wrote:
The variable declared in the header file
'xen/arch/x86/include/asm/e820.h'
is shadowed by many function parameters, so
On 07/08/2023 14:48, Jan Beulich wrote:
On 04.08.2023 22:45, Stefano Stabellini wrote:
On Fri, 4 Aug 2023, Nicola Vetrini wrote:
Rename variables to avoid shadowing and thus address
MISRA C:2012 Rule 5.3:
"An identifier declared in an inner scope shall not hide an
identifier dec
On 07/08/2023 10:09, Jan Beulich wrote:
On 04.08.2023 17:27, Nicola Vetrini wrote:
The variable declared in the header file
'xen/arch/x86/include/asm/e820.h'
is shadowed by many function parameters, so it is renamed to avoid
these
violations.
No functional changes.
Signed-off-by: Nicola
On 07/08/2023 15:42, Jan Beulich wrote:
On 07.08.2023 15:18, Nicola Vetrini wrote:
On 07/08/2023 15:05, Jan Beulich wrote:
On 04.08.2023 10:03, Nicola Vetrini wrote:
The parameters renamed in the function declaration caused shadowing
with the homonymous variable in 'xen/common/efi/boot.c
On 07/08/2023 15:05, Jan Beulich wrote:
On 04.08.2023 10:03, Nicola Vetrini wrote:
The parameters renamed in the function declaration caused shadowing
with the homonymous variable in 'xen/common/efi/boot.c'. Renaming
them also addresses Rule 8.3:
"All declarations of an object or function
not the preferred alternative (as the global may be dropped or the
callers may use a e820map other
than the global one, but here I recognize my lack of knowledge on the
internals of Xen).
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
,
since they are not called by Xen code.
Imo it should be the compiler to provide a prototype for these (much
like it does for builtins), thus ensuring that an implementation
actually matches the compiler's expectations. Yet afaics it doesn't.
Jan
Then it's perhaps best to deviate them.
--
Nicola
On 07/08/2023 10:31, Jan Beulich wrote:
On 04.08.2023 17:27, Nicola Vetrini wrote:
The macros defined 'xen/include/public/arch-x86/xen-mca.h' have
needless
underscore prefixes for parameter names and variable names that cause
shadowing with e.g. the variable 'i' in function 'mce_action
On 07/08/2023 11:15, Jan Beulich wrote:
On 07.08.2023 11:01, Julien Grall wrote:
On 07/08/2023 09:14, Jan Beulich wrote:
On 04.08.2023 17:27, Nicola Vetrini wrote:
--- a/xen/include/xen/delay.h
+++ b/xen/include/xen/delay.h
@@ -5,6 +5,6 @@
#include
#define mdelay(n) (\
- {unsigned
On 07/08/2023 10:23, Jan Beulich wrote:
On 04.08.2023 17:27, Nicola Vetrini wrote:
Rename the local variables to avoid clashing with function 'xstate'
defined below, but declared in the corresponding header file.
Hmm, there are two functions with such a local variable, but you don't
change
On 07/08/2023 10:11, Jan Beulich wrote:
On 04.08.2023 17:27, Nicola Vetrini wrote:
The types u{8,16,32,64} defined in 'xen/arch/x86/include/asm/types.h'
shadow the variables in the modified function, hence violating Rule
5.3.
Therefore, the rename takes care of the shadowing.
No functional
On 07/08/2023 10:09, Jan Beulich wrote:
On 04.08.2023 17:27, Nicola Vetrini wrote:
The variable declared in the header file
'xen/arch/x86/include/asm/e820.h'
is shadowed by many function parameters, so it is renamed to avoid
these
violations.
No functional changes.
Signed-off-by: Nicola
On 03/08/2023 11:17, Jan Beulich wrote:
On 02.08.2023 16:38, Nicola Vetrini wrote:
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -2233,6 +2233,7 @@ static bool sched_tasklet_check_cpu(unsigned int
cpu)
/* fallthrough */
case TASKLET_enqueued|TASKLET_scheduled
On 04/08/2023 22:47, Stefano Stabellini wrote:
On Fri, 4 Aug 2023, Nicola Vetrini wrote:
The extern variable 'irq_desc' defined in 'irq.h' is shadowed by
local variables in the changed file. To avoid this, the variable is
renamed to 'irq_description'.
No functional change.
Signed-off
On 04/08/2023 23:24, Stefano Stabellini wrote:
On Fri, 4 Aug 2023, Nicola Vetrini wrote:
s/mpc_default_type/mpc_default in 'xen/arch/x86/include/asm/mpspec.h'
to avoid clashing with function parameter names in 'mpparse.c'.
No functional changes.
Signed-off-by: Nicola Vetrini
---
Even though
On 04/08/2023 23:19, Stefano Stabellini wrote:
On Fri, 4 Aug 2023, Nicola Vetrini wrote:
The variable declared in the header file
'xen/arch/x86/include/asm/e820.h'
is shadowed by many function parameters, so it is renamed to avoid
these
violations.
No functional changes.
Signed-off
? mic_ : NULL;\
} while (0)
--
2.34.1
Stray blanks here, sorry.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
The types u{8,16,32,64} defined in 'xen/arch/x86/include/asm/types.h'
shadow the variables in the modified function, hence violating Rule 5.3.
Therefore, the rename takes care of the shadowing.
No functional changes.
Signed-off-by: Nicola Vetrini
---
xen/common/libelf/libelf-tools.c | 24
of future ones.
No functional change.
Signed-off-by: Nicola Vetrini
---
The spirit of this patch is similar to this one [1] made by Jan that arose from
a violation of this rule.
[1]
https://gitlab.com/xen-project/xen/-/commit/c0579c65f6bef794cd449fbc946feacccf485f2e
---
xen/include/public/arch
701 - 800 of 946 matches
Mail list logo