[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230321170513.2401534-13-rppt@kernel.org>
Date: Tue, 21 Mar 2023 19:05:11 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: David Hildenbrand <david@...hat.com>,
Doug Berger <opendmb@...il.com>,
Matthew Wilcox <willy@...radead.org>,
Mel Gorman <mgorman@...e.de>, Michal Hocko <mhocko@...nel.org>,
Mike Rapoport <rppt@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Vlastimil Babka <vbabka@...e.cz>, linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org, linux-mm@...ck.org
Subject: [PATCH v2 12/14] mm: move kmem_cache_init() declaration to mm/slab.h
From: "Mike Rapoport (IBM)" <rppt@...nel.org>
kmem_cache_init() is called only from mm_core_init(), there is no need
to declare it in include/linux/slab.h
Move kmem_cache_init() declaration to mm/slab.h
Signed-off-by: Mike Rapoport (IBM) <rppt@...nel.org>
Reviewed-by: David Hildenbrand <david@...hat.com>
---
include/linux/slab.h | 1 -
mm/mm_init.c | 1 +
mm/slab.h | 1 +
3 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/slab.h b/include/linux/slab.h
index aa4575ef2965..f8b1d63c63a3 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -167,7 +167,6 @@ struct mem_cgroup;
/*
* struct kmem_cache related prototypes
*/
-void __init kmem_cache_init(void);
bool slab_is_available(void);
struct kmem_cache *kmem_cache_create(const char *name, unsigned int size,
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 8adadf51bbd2..53fb8e9d1e3b 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -27,6 +27,7 @@
#include <linux/swap.h>
#include <linux/cma.h>
#include "internal.h"
+#include "slab.h"
#include "shuffle.h"
#include <asm/setup.h>
diff --git a/mm/slab.h b/mm/slab.h
index 43966aa5fadf..3f8df2244f5a 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -4,6 +4,7 @@
/*
* Internal slab definitions
*/
+void __init kmem_cache_init(void);
/* Reuses the bits in struct page */
struct slab {
--
2.35.1
Powered by blists - more mailing lists