diff options
author | Borislav Petkov <bp@suse.de> | 2018-02-28 05:28:40 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-03-08 04:19:25 -0500 |
commit | 854857f5944c59a881ff607b37ed9ed41d031a3b (patch) | |
tree | 586e6c0ea1a7392ba717975b35526b4998619e16 | |
parent | 36268223c1e9981d6cfc33aff8520b3bde4b8114 (diff) |
x86/microcode: Get rid of struct apply_microcode_ctx
It is a useless remnant from earlier times. Use the ucode_state enum
directly.
No functional change.
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Tested-by: Ashok Raj <ashok.raj@intel.com>
Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
Link: https://lkml.kernel.org/r/20180228102846.13447-2-bp@alien8.de
-rw-r--r-- | arch/x86/kernel/cpu/microcode/core.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index aa1b9a422f2b..63370651e376 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c | |||
@@ -373,26 +373,23 @@ static int collect_cpu_info(int cpu) | |||
373 | return ret; | 373 | return ret; |
374 | } | 374 | } |
375 | 375 | ||
376 | struct apply_microcode_ctx { | ||
377 | enum ucode_state err; | ||
378 | }; | ||
379 | |||
380 | static void apply_microcode_local(void *arg) | 376 | static void apply_microcode_local(void *arg) |
381 | { | 377 | { |
382 | struct apply_microcode_ctx *ctx = arg; | 378 | enum ucode_state *err = arg; |
383 | 379 | ||
384 | ctx->err = microcode_ops->apply_microcode(smp_processor_id()); | 380 | *err = microcode_ops->apply_microcode(smp_processor_id()); |
385 | } | 381 | } |
386 | 382 | ||
387 | static int apply_microcode_on_target(int cpu) | 383 | static int apply_microcode_on_target(int cpu) |
388 | { | 384 | { |
389 | struct apply_microcode_ctx ctx = { .err = 0 }; | 385 | enum ucode_state err; |
390 | int ret; | 386 | int ret; |
391 | 387 | ||
392 | ret = smp_call_function_single(cpu, apply_microcode_local, &ctx, 1); | 388 | ret = smp_call_function_single(cpu, apply_microcode_local, &err, 1); |
393 | if (!ret) | 389 | if (!ret) { |
394 | ret = ctx.err; | 390 | if (err == UCODE_ERROR) |
395 | 391 | ret = 1; | |
392 | } | ||
396 | return ret; | 393 | return ret; |
397 | } | 394 | } |
398 | 395 | ||