diff mbox series

[XEN,1/6] xen/acpi: address remaining violations of MISRA C:2012 Rule 8.2

Message ID 6c0fa7c13641c53800c323285275fd58d9989326.1701764980.git.federico.serafini@bugseng.com (mailing list archive)
State Superseded
Headers show
Series xen: address violations of MISRA C:2012 Rule 8.2 | expand

Commit Message

Federico Serafini Dec. 5, 2023, 11:55 a.m. UTC
Add missing parameter names to address violations of MISRA C:2012
Rule 8.2. Furthermore, use C standard types to comply with XEN coding style.

No functional change.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 xen/arch/x86/include/asm/acpi.h           |  2 +-
 xen/include/acpi/apei.h                   |  5 +++--
 xen/include/acpi/cpufreq/cpufreq.h        |  2 +-
 xen/include/acpi/cpufreq/processor_perf.h | 16 ++++++++--------
 4 files changed, 13 insertions(+), 12 deletions(-)

Comments

Stefano Stabellini Dec. 6, 2023, 3:07 a.m. UTC | #1
On Tue, 5 Dec 2023, Federico Serafini wrote:
> Add missing parameter names to address violations of MISRA C:2012
> Rule 8.2. Furthermore, use C standard types to comply with XEN coding style.
> 
> No functional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
> ---
>  xen/arch/x86/include/asm/acpi.h           |  2 +-
>  xen/include/acpi/apei.h                   |  5 +++--
>  xen/include/acpi/cpufreq/cpufreq.h        |  2 +-
>  xen/include/acpi/cpufreq/processor_perf.h | 16 ++++++++--------
>  4 files changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/xen/arch/x86/include/asm/acpi.h b/xen/arch/x86/include/asm/acpi.h
> index 0df92d3714..d54c105f61 100644
> --- a/xen/arch/x86/include/asm/acpi.h
> +++ b/xen/arch/x86/include/asm/acpi.h
> @@ -81,7 +81,7 @@ extern bool acpi_lapic, acpi_ioapic, acpi_noirq;
>  extern bool acpi_force, acpi_ht, acpi_disabled;
>  extern u32 acpi_smi_cmd;
>  extern u8 acpi_enable_value, acpi_disable_value;
> -void acpi_pic_sci_set_trigger(unsigned int, u16);
> +void acpi_pic_sci_set_trigger(unsigned int irq, uint16_t trigger);

There is something strange about this one, I cannot find the definition
anywhere. Am I missing anything?

Everything else looks good
Jan Beulich Dec. 6, 2023, 8:03 a.m. UTC | #2
On 06.12.2023 04:07, Stefano Stabellini wrote:
> On Tue, 5 Dec 2023, Federico Serafini wrote:
>> --- a/xen/arch/x86/include/asm/acpi.h
>> +++ b/xen/arch/x86/include/asm/acpi.h
>> @@ -81,7 +81,7 @@ extern bool acpi_lapic, acpi_ioapic, acpi_noirq;
>>  extern bool acpi_force, acpi_ht, acpi_disabled;
>>  extern u32 acpi_smi_cmd;
>>  extern u8 acpi_enable_value, acpi_disable_value;
>> -void acpi_pic_sci_set_trigger(unsigned int, u16);
>> +void acpi_pic_sci_set_trigger(unsigned int irq, uint16_t trigger);
> 
> There is something strange about this one, I cannot find the definition
> anywhere. Am I missing anything?

That was apparently added by mistake in 0de39e40277b ("Update ACPI headers
to Linux 2.6.24"). I wouldn't be surprised if there were more.

So yes, the line wants deleting, not updating.

Jan
diff mbox series

Patch

diff --git a/xen/arch/x86/include/asm/acpi.h b/xen/arch/x86/include/asm/acpi.h
index 0df92d3714..d54c105f61 100644
--- a/xen/arch/x86/include/asm/acpi.h
+++ b/xen/arch/x86/include/asm/acpi.h
@@ -81,7 +81,7 @@  extern bool acpi_lapic, acpi_ioapic, acpi_noirq;
 extern bool acpi_force, acpi_ht, acpi_disabled;
 extern u32 acpi_smi_cmd;
 extern u8 acpi_enable_value, acpi_disable_value;
-void acpi_pic_sci_set_trigger(unsigned int, u16);
+void acpi_pic_sci_set_trigger(unsigned int irq, uint16_t trigger);
 
 static inline void disable_acpi(void)
 {
diff --git a/xen/include/acpi/apei.h b/xen/include/acpi/apei.h
index eab16e2543..495819e362 100644
--- a/xen/include/acpi/apei.h
+++ b/xen/include/acpi/apei.h
@@ -12,8 +12,9 @@ 
 
 #define FIX_APEI_RANGE_MAX 64
 
-typedef int (*apei_hest_func_t)(const struct acpi_hest_header *, void *);
-int apei_hest_parse(apei_hest_func_t, void *);
+typedef int (*apei_hest_func_t)(const struct acpi_hest_header *hest_hdr,
+                                void *data);
+int apei_hest_parse(apei_hest_func_t func, void *data);
 
 int erst_write(const struct cper_record_header *record);
 ssize_t erst_get_record_count(void);
diff --git a/xen/include/acpi/cpufreq/cpufreq.h b/xen/include/acpi/cpufreq/cpufreq.h
index 3456d4c95f..b4685a9085 100644
--- a/xen/include/acpi/cpufreq/cpufreq.h
+++ b/xen/include/acpi/cpufreq/cpufreq.h
@@ -177,7 +177,7 @@  struct cpufreq_driver {
 
 extern struct cpufreq_driver cpufreq_driver;
 
-int cpufreq_register_driver(const struct cpufreq_driver *);
+int cpufreq_register_driver(const struct cpufreq_driver *driver_data);
 
 static inline
 void cpufreq_verify_within_limits(struct cpufreq_policy *policy,
diff --git a/xen/include/acpi/cpufreq/processor_perf.h b/xen/include/acpi/cpufreq/processor_perf.h
index 8b5a1b9bde..7cd2400619 100644
--- a/xen/include/acpi/cpufreq/processor_perf.h
+++ b/xen/include/acpi/cpufreq/processor_perf.h
@@ -10,16 +10,16 @@ 
 int powernow_cpufreq_init(void);
 unsigned int powernow_register_driver(void);
 unsigned int get_measured_perf(unsigned int cpu, unsigned int flag);
-void cpufreq_residency_update(unsigned int, uint8_t);
-void cpufreq_statistic_update(unsigned int, uint8_t, uint8_t);
-int  cpufreq_statistic_init(unsigned int);
-void cpufreq_statistic_exit(unsigned int);
-void cpufreq_statistic_reset(unsigned int);
+void cpufreq_residency_update(unsigned int cpu, uint8_t state);
+void cpufreq_statistic_update(unsigned int cpu, uint8_t from, uint8_t to);
+int  cpufreq_statistic_init(unsigned int cpuid);
+void cpufreq_statistic_exit(unsigned int cpuid);
+void cpufreq_statistic_reset(unsigned int cpuid);
 
-int  cpufreq_limit_change(unsigned int);
+int  cpufreq_limit_change(unsigned int cpu);
 
-int  cpufreq_add_cpu(unsigned int);
-int  cpufreq_del_cpu(unsigned int);
+int  cpufreq_add_cpu(unsigned int cpu);
+int  cpufreq_del_cpu(unsigned int cpu);
 
 struct processor_performance {
     uint32_t state;