Commit 854857f5 authored by Borislav Petkov's avatar Borislav Petkov Committed by Thomas Gleixner

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: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Tested-by: default avatarAshok 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
parent 36268223
...@@ -373,26 +373,23 @@ static int collect_cpu_info(int cpu) ...@@ -373,26 +373,23 @@ static int collect_cpu_info(int cpu)
return ret; return ret;
} }
struct apply_microcode_ctx {
enum ucode_state err;
};
static void apply_microcode_local(void *arg) static void apply_microcode_local(void *arg)
{ {
struct apply_microcode_ctx *ctx = arg; enum ucode_state *err = arg;
ctx->err = microcode_ops->apply_microcode(smp_processor_id()); *err = microcode_ops->apply_microcode(smp_processor_id());
} }
static int apply_microcode_on_target(int cpu) static int apply_microcode_on_target(int cpu)
{ {
struct apply_microcode_ctx ctx = { .err = 0 }; enum ucode_state err;
int ret; int ret;
ret = smp_call_function_single(cpu, apply_microcode_local, &ctx, 1); ret = smp_call_function_single(cpu, apply_microcode_local, &err, 1);
if (!ret) if (!ret) {
ret = ctx.err; if (err == UCODE_ERROR)
ret = 1;
}
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment