On 30/06/23 16:21, Andrew Cooper wrote:
On 30/06/2023 8:36 am, Federico Serafini wrote:
Hello Stefano,
On 29/06/23 21:47, Stefano Stabellini wrote:
On Thu, 29 Jun 2023, Federico Serafini wrote:
Change the parameter names of function declarations to be consistent
with the names used in the corresponding function definitions
so as to fix violations of MISRA C:2012 Rule 8.3.
Signed-off-by: Federico Serafini <federico.seraf...@bugseng.com>
---
diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
b/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
index d07fcb2bc9..24bf409d8f 100644
--- a/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
+++ b/xen/arch/x86/include/asm/hvm/vmx/vmcs.h
@@ -656,10 +656,10 @@ bool vmx_msr_is_intercepted(struct
vmx_msr_bitmap *msr_bitmap,
unsigned int msr, bool is_write)
__nonnull(1);
void virtual_vmcs_enter(const struct vcpu *);
void virtual_vmcs_exit(const struct vcpu *);
-u64 virtual_vmcs_vmread(const struct vcpu *, u32 encoding);
+u64 virtual_vmcs_vmread(const struct vcpu *, u32 vmcs_encoding);
Shouldn't the first parameter be "v" to match the definition?
Or is that a different MISRA C rule?
This is a violation of MISRA C:2012 Rule 8.2:
"function types shall be in prototype form with named parameters".
However, I can propose a new patch version to fix it as well.
As a general note - if you need to make multiple changes like this, it's
far better to do them as a single patch.
The end result tends to be easier to review, and it reduces the textural
dependencies between the various patches floating about on list.
~Andrew
Hello Andrew,
I will try to do it.
Regards
--
Federico Serafini, M.Sc.
Software Engineer, BUGSENG (http://bugseng.com)