File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -257,15 +257,9 @@ static const struct {
257
257
{ "auto" , SPECTRE_V2_CMD_AUTO , false },
258
258
};
259
259
260
- static void __init spec2_print_if_insecure (const char * reason )
260
+ static void __init spec_v2_print_cond (const char * reason , bool secure )
261
261
{
262
- if (boot_cpu_has_bug (X86_BUG_SPECTRE_V2 ))
263
- pr_info ("%s selected on command line.\n" , reason );
264
- }
265
-
266
- static void __init spec2_print_if_secure (const char * reason )
267
- {
268
- if (!boot_cpu_has_bug (X86_BUG_SPECTRE_V2 ))
262
+ if (boot_cpu_has_bug (X86_BUG_SPECTRE_V2 ) != secure )
269
263
pr_info ("%s selected on command line.\n" , reason );
270
264
}
271
265
@@ -309,11 +303,8 @@ static enum spectre_v2_mitigation_cmd __init spectre_v2_parse_cmdline(void)
309
303
return SPECTRE_V2_CMD_AUTO ;
310
304
}
311
305
312
- if (mitigation_options [i ].secure )
313
- spec2_print_if_secure (mitigation_options [i ].option );
314
- else
315
- spec2_print_if_insecure (mitigation_options [i ].option );
316
-
306
+ spec_v2_print_cond (mitigation_options [i ].option ,
307
+ mitigation_options [i ].secure );
317
308
return cmd ;
318
309
}
319
310
You can’t perform that action at this time.
0 commit comments