Re: [patch 04/25] debugobjects: Remove pointless hlist initialization

From: Leizhen (ThunderTown)
Date: Wed Oct 09 2024 - 22:20:03 EST




On 2024/10/8 0:49, Thomas Gleixner wrote:
> It's BSS zero initialized.

Reviewed-by: Zhen Lei <thunder.leizhen@xxxxxxxxxx>

>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> ---
> lib/debugobjects.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> --- a/lib/debugobjects.c
> +++ b/lib/debugobjects.c
> @@ -1364,20 +1364,11 @@ static bool __init debug_objects_replace
> void __init debug_objects_mem_init(void)
> {
> struct kmem_cache *cache;
> - int cpu, extras;
> + int extras;
>
> if (!debug_objects_enabled)
> return;
>
> - /*
> - * Initialize the percpu object pools
> - *
> - * Initialization is not strictly necessary, but was done for
> - * completeness.
> - */
> - for_each_possible_cpu(cpu)
> - INIT_HLIST_HEAD(&per_cpu(percpu_obj_pool.free_objs, cpu));
> -
> if (!debug_objects_selftest())
> return;
>
>
>
> .
>

--
Regards,
Zhen Lei