diff mbox series

[XEN,v3,4/6] xen/arm: vgic: change parameter name in 'init' and 'free' functions.

Message ID 0332cf060e181d60e249a004182be011f93602a2.1687771796.git.federico.serafini@bugseng.com (mailing list archive)
State New, archived
Headers show
Series fix violations of MISRA C:2012 Rule 8.3 on parameter names. | expand

Commit Message

Federico Serafini June 26, 2023, 9:52 a.m. UTC
In the current versions of vcpu_vgic_init() and vcpu_vgic_free(),
the declarations (correctly) use the parameter name 'v' while the
corresponding definitions use the parameter name 'vcpu'.
Since it is common to use 'v' to denote a vCPU, change the parameter
name 'vcpu' of function definitions to 'v', thus fixing violations of
MISRA C:2012 Rule 8.3.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 xen/arch/arm/vgic/vgic-init.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Julien Grall June 26, 2023, 2:14 p.m. UTC | #1
Hi,

On 26/06/2023 10:52, Federico Serafini wrote:
> In the current versions of vcpu_vgic_init() and vcpu_vgic_free(),
> the declarations (correctly) use the parameter name 'v' while the
> corresponding definitions use the parameter name 'vcpu'.
> Since it is common to use 'v' to denote a vCPU, change the parameter
> name 'vcpu' of function definitions to 'v', thus fixing violations of
> MISRA C:2012 Rule 8.3.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Reviewed-by: Julien Grall <jgrall@amazon.com>

Cheers,
diff mbox series

Patch

diff --git a/xen/arch/arm/vgic/vgic-init.c b/xen/arch/arm/vgic/vgic-init.c
index ea739d081e..76b85ea823 100644
--- a/xen/arch/arm/vgic/vgic-init.c
+++ b/xen/arch/arm/vgic/vgic-init.c
@@ -196,16 +196,16 @@  int domain_vgic_init(struct domain *d, unsigned int nr_spis)
  * vcpu_vgic_init() - Register VCPU-specific KVM iodevs
  * was: kvm_vgic_vcpu_init()
  * Xen: adding vgic_vx_enable() call
- * @vcpu: pointer to the VCPU being created and initialized
+ * @v: pointer to the VCPU being created and initialized
  */
-int vcpu_vgic_init(struct vcpu *vcpu)
+int vcpu_vgic_init(struct vcpu *v)
 {
     int ret = 0;
 
-    vgic_vcpu_early_init(vcpu);
+    vgic_vcpu_early_init(v);
 
     if ( gic_hw_version() == GIC_V2 )
-        vgic_v2_enable(vcpu);
+        vgic_v2_enable(v);
     else
         ret = -ENXIO;
 
@@ -239,9 +239,9 @@  void domain_vgic_free(struct domain *d)
     dist->nr_spis = 0;
 }
 
-int vcpu_vgic_free(struct vcpu *vcpu)
+int vcpu_vgic_free(struct vcpu *v)
 {
-    struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic;
+    struct vgic_cpu *vgic_cpu = &v->arch.vgic;
 
     INIT_LIST_HEAD(&vgic_cpu->ap_list_head);