[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v2] x86/HVM: address violations of MISRA C:2012 Rules 8.2 and 8.3



On Wed, 19 Jul 2023, Federico Serafini wrote:
> Give a name to unnamed parameters thus addressing violations of
> MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with
> named parameters").
> Keep consistency between parameter names and types used in function
> declarations and the ones used in the corresponding function
> definitions, thus addressing violations of MISRA C:2012 Rule 8.3
> ("All declarations of an object or function shall use the same names
> and type qualifiers").
> 
> No functional changes.
> 
> Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
> ---
> Changes in v2:
>   - u64 vs uint64_t mismatches are solved in favor of the stdint types.
> ---
>  xen/arch/x86/hvm/domain.c              |  2 +-
>  xen/arch/x86/hvm/hvm.c                 |  6 +++---
>  xen/arch/x86/hvm/rtc.c                 | 12 ++++++------
>  xen/arch/x86/hvm/svm/nestedsvm.c       |  8 ++++----
>  xen/arch/x86/hvm/vioapic.c             |  2 +-
>  xen/arch/x86/include/asm/hvm/domain.h  |  2 +-
>  xen/arch/x86/include/asm/hvm/hvm.h     | 18 +++++++++---------
>  xen/arch/x86/include/asm/hvm/irq.h     | 14 +++++++-------
>  xen/arch/x86/include/asm/hvm/save.h    |  4 ++--
>  xen/arch/x86/include/asm/hvm/support.h |  2 +-
>  10 files changed, 35 insertions(+), 35 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/domain.c b/xen/arch/x86/hvm/domain.c
> index 7692ee24c2..7f6e362a70 100644
> --- a/xen/arch/x86/hvm/domain.c
> +++ b/xen/arch/x86/hvm/domain.c
> @@ -100,7 +100,7 @@ static int check_segment(struct segment_register *reg, 
> enum x86_segment seg)
>  }
>  
>  /* Called by VCPUOP_initialise for HVM guests. */
> -int arch_set_info_hvm_guest(struct vcpu *v, const vcpu_hvm_context_t *ctx)
> +int arch_set_info_hvm_guest(struct vcpu *v, const struct vcpu_hvm_context 
> *ctx)
>  {
>      const struct domain *d = v->domain;
>      struct cpu_user_regs *uregs = &v->arch.user_regs;
> diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
> index 57363c2ae1..28d131a202 100644
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -272,7 +272,7 @@ uint8_t hvm_combine_hw_exceptions(uint8_t vec1, uint8_t 
> vec2)
>      return X86_EXC_DF;
>  }
>  
> -void hvm_set_rdtsc_exiting(struct domain *d, bool_t enable)
> +void hvm_set_rdtsc_exiting(struct domain *d, bool enable)

This is actually getting hvm_set_rdtsc_exiting out-of-sync with its
declaration in xen/arch/x86/include/asm/hvm/hvm.h ?

Everything else looks good to me




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.