The sole two declarations there aren't needed, as the functions aren't
reference from outside of mce_amd.c. (This also addresses two Misra rule
8.7 violations, just that we apparently didn't accept that rule for some
reason.)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
If it wouldn't result in more churn, I would have been inclined to also
drop at least the mc_ prefixes of both functions.
--- a/xen/arch/x86/cpu/mcheck/mce_amd.c
+++ b/xen/arch/x86/cpu/mcheck/mce_amd.c
@@ -56,7 +56,6 @@
#include "mce.h"
#include "x86_mca.h"
-#include "mce_amd.h"
#include "mcaction.h"
#include "vmce.h"
@@ -101,7 +100,7 @@ mc_ec2type(uint16_t errorcode)
return 0;
}
-bool cf_check mc_amd_recoverable_scan(uint64_t status)
+static bool cf_check mc_amd_recoverable_scan(uint64_t status)
{
bool ret = false;
enum mc_ec_type ectype;
@@ -131,7 +130,8 @@ bool cf_check mc_amd_recoverable_scan(ui
return ret;
}
-bool cf_check mc_amd_addrcheck(uint64_t status, uint64_t misc, int addrtype)
+static bool cf_check mc_amd_addrcheck(uint64_t status, uint64_t misc,
+ int addrtype)
{
enum mc_ec_type ectype;
uint16_t errorcode;
--- a/xen/arch/x86/cpu/mcheck/mce_amd.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _MCHECK_AMD_H
-#define _MCHECK_AMD_H
-
-bool cf_check mc_amd_recoverable_scan(uint64_t status);
-bool cf_check mc_amd_addrcheck(uint64_t status, uint64_t misc, int addrtype);
-
-#endif
LGTM:
Reviewed-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
On 10/27/26 2:28 PM, Jan Beulich wrote:
> The sole two declarations there aren't needed, as the functions aren't
> reference from outside of mce_amd.c. (This also addresses two Misra rule
> 8.7 violations, just that we apparently didn't accept that rule for some
> reason.)
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> If it wouldn't result in more churn, I would have been inclined to also
> drop at least the mc_ prefixes of both functions.
>
> --- a/xen/arch/x86/cpu/mcheck/mce_amd.c
> +++ b/xen/arch/x86/cpu/mcheck/mce_amd.c
> @@ -56,7 +56,6 @@
>
> #include "mce.h"
> #include "x86_mca.h"
> -#include "mce_amd.h"
> #include "mcaction.h"
> #include "vmce.h"
>
> @@ -101,7 +100,7 @@ mc_ec2type(uint16_t errorcode)
> return 0;
> }
>
> -bool cf_check mc_amd_recoverable_scan(uint64_t status)
> +static bool cf_check mc_amd_recoverable_scan(uint64_t status)
> {
> bool ret = false;
> enum mc_ec_type ectype;
> @@ -131,7 +130,8 @@ bool cf_check mc_amd_recoverable_scan(ui
> return ret;
> }
>
> -bool cf_check mc_amd_addrcheck(uint64_t status, uint64_t misc, int addrtype)
> +static bool cf_check mc_amd_addrcheck(uint64_t status, uint64_t misc,
> + int addrtype)
> {
> enum mc_ec_type ectype;
> uint16_t errorcode;
> --- a/xen/arch/x86/cpu/mcheck/mce_amd.h
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -#ifndef _MCHECK_AMD_H
> -#define _MCHECK_AMD_H
> -
> -bool cf_check mc_amd_recoverable_scan(uint64_t status);
> -bool cf_check mc_amd_addrcheck(uint64_t status, uint64_t misc, int addrtype);
> -
> -#endif
© 2016 - 2026 Red Hat, Inc.