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

[xen master] x86/HVM/emul: address violations of MISRA C:2012 Rules 8.2 and 8.3



commit 4bf014c6f7d7cc9a9e017cef0eb5ff4bf27526e9
Author:     Federico Serafini <federico.serafini@xxxxxxxxxxx>
AuthorDate: Thu Jul 20 10:04:36 2023 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jul 20 10:04:36 2023 +0200

    x86/HVM/emul: address violations of MISRA C:2012 Rules 8.2 and 8.3
    
    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 used in function declarations
    and names 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").
    
    Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Paul Durrant <paul@xxxxxxx>
---
 xen/arch/x86/include/asm/hvm/emulate.h |  8 ++++----
 xen/arch/x86/include/asm/hvm/io.h      | 14 +++++++-------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/xen/arch/x86/include/asm/hvm/emulate.h 
b/xen/arch/x86/include/asm/hvm/emulate.h
index d8ba2df4e4..398d0db078 100644
--- a/xen/arch/x86/include/asm/hvm/emulate.h
+++ b/xen/arch/x86/include/asm/hvm/emulate.h
@@ -121,12 +121,12 @@ static inline void hvmemul_cache_destroy(struct vcpu *v)
 {
     XFREE(v->arch.hvm.hvm_io.cache);
 }
-bool hvmemul_read_cache(const struct vcpu *, paddr_t gpa,
+bool hvmemul_read_cache(const struct vcpu *v, paddr_t gpa,
                         void *buffer, unsigned int size);
-void hvmemul_write_cache(const struct vcpu *, paddr_t gpa,
+void hvmemul_write_cache(const struct vcpu *v, paddr_t gpa,
                          const void *buffer, unsigned int size);
-unsigned int hvmemul_cache_disable(struct vcpu *);
-void hvmemul_cache_restore(struct vcpu *, unsigned int token);
+unsigned int hvmemul_cache_disable(struct vcpu *v);
+void hvmemul_cache_restore(struct vcpu *v, unsigned int token);
 /* For use in ASSERT()s only: */
 static inline bool hvmemul_cache_disabled(struct vcpu *v)
 {
diff --git a/xen/arch/x86/include/asm/hvm/io.h 
b/xen/arch/x86/include/asm/hvm/io.h
index 8df33eb6cc..e5225e75ef 100644
--- a/xen/arch/x86/include/asm/hvm/io.h
+++ b/xen/arch/x86/include/asm/hvm/io.h
@@ -46,17 +46,17 @@ struct hvm_io_handler {
     uint8_t type;
 };
 
-typedef int (*hvm_io_read_t)(const struct hvm_io_handler *,
+typedef int (*hvm_io_read_t)(const struct hvm_io_handler *handler,
                              uint64_t addr,
                              uint32_t size,
                              uint64_t *data);
-typedef int (*hvm_io_write_t)(const struct hvm_io_handler *,
+typedef int (*hvm_io_write_t)(const struct hvm_io_handler *handler,
                               uint64_t addr,
                               uint32_t size,
                               uint64_t data);
-typedef bool_t (*hvm_io_accept_t)(const struct hvm_io_handler *,
+typedef bool_t (*hvm_io_accept_t)(const struct hvm_io_handler *handler,
                                   const ioreq_t *p);
-typedef void (*hvm_io_complete_t)(const struct hvm_io_handler *);
+typedef void (*hvm_io_complete_t)(const struct hvm_io_handler *handler);
 
 struct hvm_io_ops {
     hvm_io_accept_t   accept;
@@ -87,11 +87,11 @@ bool relocate_portio_handler(
 
 void send_timeoffset_req(unsigned long timeoff);
 bool handle_mmio_with_translation(unsigned long gla, unsigned long gpfn,
-                                  struct npfec);
+                                  struct npfec access);
 bool handle_pio(uint16_t port, unsigned int size, int dir);
 void hvm_interrupt_post(struct vcpu *v, int vector, int type);
-void hvm_dpci_eoi(struct domain *d, unsigned int guest_irq);
-void msix_write_completion(struct vcpu *);
+void hvm_dpci_eoi(struct domain *d, unsigned int guest_gsi);
+void msix_write_completion(struct vcpu *v);
 
 #ifdef CONFIG_HVM
 void msixtbl_init(struct domain *d);
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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