[PATCH] acpi/pm-op: make do_pm_op() decl available in pm-op.c

Jan Beulich posted 1 patch 3 months, 3 weeks ago
Failed in applying to current master (apply log)
[PATCH] acpi/pm-op: make do_pm_op() decl available in pm-op.c
Posted by Jan Beulich 3 months, 3 weeks ago
This addresses a Misra rule 8.4 ("A compatible declaration shall be
visible when an object or function with external linkage is defined")
violation.

Fixes: a16f2b3e0669 ("xen/pmstat: introduce CONFIG_PM_OP")
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/acpi/pm-op.c
+++ b/xen/drivers/acpi/pm-op.c
@@ -5,6 +5,7 @@
 #include <xen/errno.h>
 #include <xen/guest_access.h>
 #include <xen/lib.h>
+#include <xen/pmstat.h>
 #include <xen/sched.h>
 
 #include <acpi/cpufreq/cpufreq.h>
Re: [PATCH] acpi/pm-op: make do_pm_op() decl available in pm-op.c
Posted by Nicola Vetrini 3 months, 3 weeks ago
On 2025-07-09 12:10, Jan Beulich wrote:
> This addresses a Misra rule 8.4 ("A compatible declaration shall be
> visible when an object or function with external linkage is defined")
> violation.
> 
> Fixes: a16f2b3e0669 ("xen/pmstat: introduce CONFIG_PM_OP")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 

Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>


Perhaps a comment with the offending function would have been helpful 
(do_pm_op).

> --- a/xen/drivers/acpi/pm-op.c
> +++ b/xen/drivers/acpi/pm-op.c
> @@ -5,6 +5,7 @@
>  #include <xen/errno.h>
>  #include <xen/guest_access.h>
>  #include <xen/lib.h>
> +#include <xen/pmstat.h>
>  #include <xen/sched.h>
> 
>  #include <acpi/cpufreq/cpufreq.h>

-- 
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253
Re: [PATCH] acpi/pm-op: make do_pm_op() decl available in pm-op.c
Posted by Nicola Vetrini 3 months, 3 weeks ago
On 2025-07-09 13:41, Nicola Vetrini wrote:
> On 2025-07-09 12:10, Jan Beulich wrote:
>> This addresses a Misra rule 8.4 ("A compatible declaration shall be
>> visible when an object or function with external linkage is defined")
>> violation.
>> 
>> Fixes: a16f2b3e0669 ("xen/pmstat: introduce CONFIG_PM_OP")
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> 
> 
> Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
> 
> 
> Perhaps a comment with the offending function would have been helpful 
> (do_pm_op).
> 

Oh, nevermind, I misread the patch title.

>> --- a/xen/drivers/acpi/pm-op.c
>> +++ b/xen/drivers/acpi/pm-op.c
>> @@ -5,6 +5,7 @@
>>  #include <xen/errno.h>
>>  #include <xen/guest_access.h>
>>  #include <xen/lib.h>
>> +#include <xen/pmstat.h>
>>  #include <xen/sched.h>
>> 
>>  #include <acpi/cpufreq/cpufreq.h>

-- 
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253