x86: Address violations of MISRA C:2012 by replacing bool_t uses

Give a name to unnamed parameters to address violations of
MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with
named parameters").
Keep consistency between object and function declarations thus
addressing violations of MISRA C:2012 Rule 8.3 ("All declarations of an
object or function shall use the same names and type qualifiers").
Replace the occurrences of bool_t with bool.

No functional change.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Federico Serafini authored and Jan Beulich committed 2023-08-07 11:24:28 +02:00
1 parent 0c8d77e117
commit 202a341fd4
2 files changed
+11 -11

No files matched your search

+3 -3
View File
@@ -26,11 +26,11 @@
bool __read_mostly opt_dom0_cpuid_faulting = true;
bool_t opt_arat = 1;
bool opt_arat = true;
boolean_param("arat", opt_arat);
/* pku: Flag to enable Memory Protection Keys (default on). */
static bool_t opt_pku = 1;
static bool opt_pku = true;
boolean_param("pku", opt_pku);
unsigned int opt_cpuid_mask_ecx = ~0u;
@@ -208,7 +208,7 @@ void ctxt_switch_levelling(const struct vcpu *next)
alternative_vcall(ctxt_switch_masking, next);
}
bool_t opt_cpu_info;
bool opt_cpu_info;
boolean_param("cpuinfo", opt_cpu_info);
int get_model_name(struct cpuinfo_x86 *c)
+8 -8
View File
@@ -96,7 +96,7 @@ extern bool probe_cpuid_faulting(void);
extern void ctxt_switch_levelling(const struct vcpu *next);
extern void (*ctxt_switch_masking)(const struct vcpu *next);
extern bool_t opt_cpu_info;
extern bool opt_cpu_info;
extern u32 trampoline_efer;
extern u64 trampoline_misc_enable_off;
@@ -109,17 +109,17 @@ extern unsigned int vaddr_bits;
extern const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id table[]);
extern void identify_cpu(struct cpuinfo_x86 *);
extern void setup_clear_cpu_cap(unsigned int);
extern void setup_force_cpu_cap(unsigned int);
extern bool is_forced_cpu_cap(unsigned int);
extern void identify_cpu(struct cpuinfo_x86 *c);
extern void setup_clear_cpu_cap(unsigned int cap);
extern void setup_force_cpu_cap(unsigned int cap);
extern bool is_forced_cpu_cap(unsigned int cap);
extern void print_cpu_info(unsigned int cpu);
extern void init_intel_cacheinfo(struct cpuinfo_x86 *c);
#define cpu_to_core(_cpu) (cpu_data[_cpu].cpu_core_id)
#define cpu_to_socket(_cpu) (cpu_data[_cpu].phys_proc_id)
unsigned int apicid_to_socket(unsigned int);
unsigned int apicid_to_socket(unsigned int apicid);
static inline int cpu_nr_siblings(unsigned int cpu)
{
@@ -410,12 +410,12 @@ void show_registers(const struct cpu_user_regs *regs);
#define dump_execution_state() \
run_in_exception_handler(show_execution_state_nonconst)
void show_page_walk(unsigned long addr);
void noreturn fatal_trap(const struct cpu_user_regs *regs, bool_t show_remote);
void noreturn fatal_trap(const struct cpu_user_regs *regs, bool show_remote);
extern void mtrr_ap_init(void);
extern void mtrr_bp_init(void);
void mcheck_init(struct cpuinfo_x86 *c, bool_t bsp);
void mcheck_init(struct cpuinfo_x86 *c, bool bsp);
void do_nmi(const struct cpu_user_regs *regs);
void do_machine_check(const struct cpu_user_regs *regs);
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.