|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 05/10] x86/ucode: Fold microcode_grab_module() into its single caller
On 28.10.2024 10:18, Andrew Cooper wrote:
> --- a/xen/arch/x86/cpu/microcode/core.c
> +++ b/xen/arch/x86/cpu/microcode/core.c
> @@ -205,19 +205,6 @@ static void __init microcode_scan_module(struct
> boot_info *bi)
> }
> }
>
> -static void __init microcode_grab_module(struct boot_info *bi)
> -{
> - if ( ucode_mod_idx < 0 )
> - ucode_mod_idx += bi->nr_modules;
> - if ( ucode_mod_idx <= 0 || ucode_mod_idx >= bi->nr_modules ||
> - !__test_and_clear_bit(ucode_mod_idx, bi->module_map) )
> - goto scan;
> - ucode_mod = *bi->mods[ucode_mod_idx].mod;
> -scan:
> - if ( ucode_scan )
> - microcode_scan_module(bi);
> -}
> -
> static struct microcode_ops __ro_after_init ucode_ops;
>
> static DEFINE_SPINLOCK(microcode_mutex);
> @@ -831,7 +818,15 @@ static int __init early_microcode_load(struct boot_info
> *bi)
> size_t size;
> struct microcode_patch *patch;
>
> - microcode_grab_module(bi);
> + if ( ucode_mod_idx < 0 )
> + ucode_mod_idx += bi->nr_modules;
> + if ( ucode_mod_idx <= 0 || ucode_mod_idx >= bi->nr_modules ||
> + !__test_and_clear_bit(ucode_mod_idx, bi->module_map) )
> + goto scan;
> + ucode_mod = *bi->mods[ucode_mod_idx].mod;
> + scan:
> + if ( ucode_scan )
> + microcode_scan_module(bi);
>
> if ( !ucode_mod.mod_end && !ucode_blob.size )
> return 0;
Could I talk you into doing away with the goto at the same time, by inverting
the if()'s condition? Preferably with that:
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |