linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/slob: make kmem_cache_boot static
@ 2022-02-17  8:58 Miaohe Lin
  2022-02-17 17:02 ` Vlastimil Babka
  2022-02-17 18:26 ` David Rientjes
  0 siblings, 2 replies; 3+ messages in thread
From: Miaohe Lin @ 2022-02-17  8:58 UTC (permalink / raw)
  To: akpm, cl, penberg, rientjes, iamjoonsoo.kim, vbabka
  Cc: linux-mm, linux-kernel, linmiaohe

kmem_cache_boot is never accessed outside slob.c. Make it static.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/slob.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/slob.c b/mm/slob.c
index 60c5842215f1..1179bcad2df8 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -708,7 +708,7 @@ int __kmem_cache_shrink(struct kmem_cache *d)
 	return 0;
 }
 
-struct kmem_cache kmem_cache_boot = {
+static struct kmem_cache kmem_cache_boot = {
 	.name = "kmem_cache",
 	.size = sizeof(struct kmem_cache),
 	.flags = SLAB_PANIC,
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/slob: make kmem_cache_boot static
  2022-02-17  8:58 [PATCH] mm/slob: make kmem_cache_boot static Miaohe Lin
@ 2022-02-17 17:02 ` Vlastimil Babka
  2022-02-17 18:26 ` David Rientjes
  1 sibling, 0 replies; 3+ messages in thread
From: Vlastimil Babka @ 2022-02-17 17:02 UTC (permalink / raw)
  To: Miaohe Lin, akpm, cl, penberg, rientjes, iamjoonsoo.kim
  Cc: linux-mm, linux-kernel

On 2/17/22 09:58, Miaohe Lin wrote:
> kmem_cache_boot is never accessed outside slob.c. Make it static.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Thanks, adding to slab tree.

> ---
>  mm/slob.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/slob.c b/mm/slob.c
> index 60c5842215f1..1179bcad2df8 100644
> --- a/mm/slob.c
> +++ b/mm/slob.c
> @@ -708,7 +708,7 @@ int __kmem_cache_shrink(struct kmem_cache *d)
>  	return 0;
>  }
>  
> -struct kmem_cache kmem_cache_boot = {
> +static struct kmem_cache kmem_cache_boot = {
>  	.name = "kmem_cache",
>  	.size = sizeof(struct kmem_cache),
>  	.flags = SLAB_PANIC,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/slob: make kmem_cache_boot static
  2022-02-17  8:58 [PATCH] mm/slob: make kmem_cache_boot static Miaohe Lin
  2022-02-17 17:02 ` Vlastimil Babka
@ 2022-02-17 18:26 ` David Rientjes
  1 sibling, 0 replies; 3+ messages in thread
From: David Rientjes @ 2022-02-17 18:26 UTC (permalink / raw)
  To: Miaohe Lin
  Cc: akpm, cl, penberg, iamjoonsoo.kim, vbabka, linux-mm, linux-kernel

On Thu, 17 Feb 2022, Miaohe Lin wrote:

> kmem_cache_boot is never accessed outside slob.c. Make it static.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Acked-by: David Rientjes <rientjes@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-17 18:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-17  8:58 [PATCH] mm/slob: make kmem_cache_boot static Miaohe Lin
2022-02-17 17:02 ` Vlastimil Babka
2022-02-17 18:26 ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).