[XEN PATCH v2] arm/cpufeature: address violations of MISRA C:2012 Rule 8.2

Federico Serafini posted 1 patch 6 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/7976ea7591a073a7896c2cfe9d0b1b77f414731a.1697632684.git.federico.serafini@bugseng.com
xen/arch/arm/include/asm/cpufeature.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[XEN PATCH v2] arm/cpufeature: address violations of MISRA C:2012 Rule 8.2
Posted by Federico Serafini 6 months, 2 weeks ago
Add missing parameter names. No functional change.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
Changes in v2:
- fixed names.
---
 xen/arch/arm/include/asm/cpufeature.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/include/asm/cpufeature.h b/xen/arch/arm/include/asm/cpufeature.h
index 8011076b8c..c95582044a 100644
--- a/xen/arch/arm/include/asm/cpufeature.h
+++ b/xen/arch/arm/include/asm/cpufeature.h
@@ -127,8 +127,8 @@ static inline void cpus_set_cap(unsigned int num)
 struct arm_cpu_capabilities {
     const char *desc;
     u16 capability;
-    bool (*matches)(const struct arm_cpu_capabilities *);
-    int (*enable)(void *); /* Called on every active CPUs */
+    bool (*matches)(const struct arm_cpu_capabilities *entry);
+    int (*enable)(void *data); /* Called on every active CPUs */
     union {
         struct {    /* To be used for eratum handling only */
             u32 midr_model;
@@ -448,10 +448,10 @@ struct cpuinfo_arm {
 
 extern struct cpuinfo_arm system_cpuinfo;
 
-extern void identify_cpu(struct cpuinfo_arm *);
+extern void identify_cpu(struct cpuinfo_arm *c);
 
 #ifdef CONFIG_ARM_64
-extern void update_system_features(const struct cpuinfo_arm *);
+extern void update_system_features(const struct cpuinfo_arm *new);
 #else
 static inline void update_system_features(const struct cpuinfo_arm *cpuinfo)
 {
-- 
2.34.1
Re: [XEN PATCH v2] arm/cpufeature: address violations of MISRA C:2012 Rule 8.2
Posted by Bertrand Marquis 6 months, 2 weeks ago
Hi Frederico,

> On 18 Oct 2023, at 14:50, Federico Serafini <federico.serafini@bugseng.com> wrote:
> 
> Add missing parameter names. No functional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>

Cheers
Bertrand

> ---
> Changes in v2:
> - fixed names.
> ---
> xen/arch/arm/include/asm/cpufeature.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/arch/arm/include/asm/cpufeature.h b/xen/arch/arm/include/asm/cpufeature.h
> index 8011076b8c..c95582044a 100644
> --- a/xen/arch/arm/include/asm/cpufeature.h
> +++ b/xen/arch/arm/include/asm/cpufeature.h
> @@ -127,8 +127,8 @@ static inline void cpus_set_cap(unsigned int num)
> struct arm_cpu_capabilities {
>     const char *desc;
>     u16 capability;
> -    bool (*matches)(const struct arm_cpu_capabilities *);
> -    int (*enable)(void *); /* Called on every active CPUs */
> +    bool (*matches)(const struct arm_cpu_capabilities *entry);
> +    int (*enable)(void *data); /* Called on every active CPUs */
>     union {
>         struct {    /* To be used for eratum handling only */
>             u32 midr_model;
> @@ -448,10 +448,10 @@ struct cpuinfo_arm {
> 
> extern struct cpuinfo_arm system_cpuinfo;
> 
> -extern void identify_cpu(struct cpuinfo_arm *);
> +extern void identify_cpu(struct cpuinfo_arm *c);
> 
> #ifdef CONFIG_ARM_64
> -extern void update_system_features(const struct cpuinfo_arm *);
> +extern void update_system_features(const struct cpuinfo_arm *new);
> #else
> static inline void update_system_features(const struct cpuinfo_arm *cpuinfo)
> {
> -- 
> 2.34.1
>