File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
arch/x86/kernel/cpu/microcode Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -373,26 +373,23 @@ static int collect_cpu_info(int cpu)
373
373
return ret ;
374
374
}
375
375
376
- struct apply_microcode_ctx {
377
- enum ucode_state err ;
378
- };
379
-
380
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
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
386
int ret ;
391
387
392
- ret = smp_call_function_single (cpu , apply_microcode_local , & ctx , 1 );
393
- if (!ret )
394
- ret = ctx .err ;
395
-
388
+ ret = smp_call_function_single (cpu , apply_microcode_local , & err , 1 );
389
+ if (!ret ) {
390
+ if (err == UCODE_ERROR )
391
+ ret = 1 ;
392
+ }
396
393
return ret ;
397
394
}
398
395
You can’t perform that action at this time.
0 commit comments