x86: make some functions and variables static rather than extern

The functions and variables touched by this commit can be static,
as they are only used within the same unit. This in turn addresses
the absence of declarations that violates MISRA C:2012 Rule 8.4.

Fixes: 741367e77d ("mce: Clean-up mcheck_init handler")
Fixes: 45f57813f6 ("x86/MCE: implement recoverscan for AMD")
Fixes: 155587481e ("x86/microcode: Scan the initramfs payload for microcode blob")
Fixes: af50dd63cf ("Pull nmi/traps changes from Linux 2.6.14.")
Fixes: fef244b179 ("x86/spec-ctrl: Knobs for STIBP and PSFD, and follow hardware STIBP hint")
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Nicola Vetrini authored and Jan Beulich committed 2023-08-10 15:15:12 +02:00
1 parent baad64ad38
commit 859c868de4
5 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -599,7 +599,7 @@ unsigned int mce_firstbank(struct cpuinfo_x86 *c)
c->x86_vendor == X86_VENDOR_INTEL && c->x86_model < 0x1a;
}
int show_mca_info(int inited, struct cpuinfo_x86 *c)
static int show_mca_info(int inited, struct cpuinfo_x86 *c)
{
static enum mcheck_type g_type = mcheck_unset;
+1 -1
View File
@@ -87,7 +87,7 @@ enum mc_ec_type {
MC_EC_BUS_TYPE = 0x0800,
};
enum mc_ec_type
static enum mc_ec_type
mc_ec2type(uint16_t errorcode)
{
if ( errorcode & MC_EC_BUS_TYPE )
+1 -1
View File
@@ -149,7 +149,7 @@ static int __init cf_check parse_ucode(const char *s)
}
custom_param("ucode", parse_ucode);
void __init microcode_scan_module(
static void __init microcode_scan_module(
unsigned long *module_map,
const multiboot_info_t *mbi)
{
+1 -1
View File
@@ -108,7 +108,7 @@ static unsigned int lapic_nmi_owner;
* be enabled
* -1: the lapic NMI watchdog is disabled, but can be enabled
*/
int nmi_active;
static int nmi_active;
#define K7_EVNTSEL_ENABLE (1 << 22)
#define K7_EVNTSEL_INT (1 << 20)
+2 -2
View File
@@ -43,9 +43,9 @@ static enum ind_thunk {
} opt_thunk __initdata = THUNK_DEFAULT;
static int8_t __initdata opt_ibrs = -1;
int8_t __initdata opt_stibp = -1;
static int8_t __initdata opt_stibp = -1;
bool __ro_after_init opt_ssbd;
int8_t __initdata opt_psfd = -1;
static int8_t __initdata opt_psfd = -1;
int8_t __ro_after_init opt_ibpb_ctxt_switch = -1;
int8_t __read_mostly opt_eager_fpu = -1;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.