Skip to contentSkip to conversation

x86/MCE: purge mce_amd.h

PATCH In review Jan Beulich 2 participants 2 messages Oct 27

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/MCE: purge mce_amd.h

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.)

---
If it wouldn't result in more churn, I would have been inclined to also drop at least the mc_ prefixes of both functions.

xen/arch/x86/cpu/mcheck/mce_amd.c +3 -3
@@ -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;
xen/arch/x86/cpu/mcheck/mce_amd.h deleted +0 -7
@@ -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
Reviewed-by on v1 1/1
#1 lore raw

LGTM:

Quoted 49 lines · Jan Beulich

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.)

---
If it wouldn't result in more churn, I would have been inclined to also drop at least the mc_ prefixes of both functions.

xen/arch/x86/cpu/mcheck/mce_amd.c +3 -3
@@ -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;
xen/arch/x86/cpu/mcheck/mce_amd.h deleted +0 -7
@@ -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