lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2981c978-2e00-5e6a-a9c5-4c82f184430d@redhat.com>
Date:   Fri, 1 Apr 2022 12:29:13 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Miaohe Lin <linmiaohe@...wei.com>, cl@...ux.com,
        penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
        akpm@...ux-foundation.org, vbabka@...e.cz
Cc:     roman.gushchin@...ux.dev, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/slab: remove some unused functions

On 22.03.22 10:14, Miaohe Lin wrote:
> alternate_node_alloc and ____cache_alloc_node are always called when
> CONFIG_NUMA. So we can remove the unused !CONFIG_NUMA variant. Also
> forward declaration for alternate_node_alloc is unnecessary. Remove
> it too.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
>  mm/slab.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/mm/slab.c b/mm/slab.c
> index d9dec7a8fd79..81301df47057 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -619,18 +619,6 @@ static inline int cache_free_alien(struct kmem_cache *cachep, void *objp)
>  	return 0;
>  }
>  
> -static inline void *alternate_node_alloc(struct kmem_cache *cachep,
> -		gfp_t flags)
> -{
> -	return NULL;
> -}
> -
> -static inline void *____cache_alloc_node(struct kmem_cache *cachep,
> -		 gfp_t flags, int nodeid)
> -{
> -	return NULL;
> -}
> -
>  static inline gfp_t gfp_exact_node(gfp_t flags)
>  {
>  	return flags & ~__GFP_NOFAIL;
> @@ -639,7 +627,6 @@ static inline gfp_t gfp_exact_node(gfp_t flags)
>  #else	/* CONFIG_NUMA */
>  
>  static void *____cache_alloc_node(struct kmem_cache *, gfp_t, int);
> -static void *alternate_node_alloc(struct kmem_cache *, gfp_t);
>  
>  static struct alien_cache *__alloc_alien_cache(int node, int entries,
>  						int batch, gfp_t gfp)

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ