linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: page_alloc: make compound_page_dtors static
@ 2023-06-17  3:46 Miaohe Lin
  0 siblings, 0 replies; only message in thread
From: Miaohe Lin @ 2023-06-17  3:46 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, linmiaohe

It's only used inside page_alloc.c now. So make it static and remove the
declaration in mm.h.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 include/linux/mm.h | 1 -
 mm/page_alloc.c    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index fdd966b11f79..441ab55e94c5 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1220,7 +1220,6 @@ enum compound_dtor_id {
 #endif
 	NR_COMPOUND_DTORS,
 };
-extern compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS];
 
 static inline void folio_set_compound_dtor(struct folio *folio,
 		enum compound_dtor_id compound_dtor)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9eb42182eb90..3ab51fb9191c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -284,7 +284,7 @@ const char * const migratetype_names[MIGRATE_TYPES] = {
 #endif
 };
 
-compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS] = {
+static compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS] = {
 	[NULL_COMPOUND_DTOR] = NULL,
 	[COMPOUND_PAGE_DTOR] = free_compound_page,
 #ifdef CONFIG_HUGETLB_PAGE
-- 
2.27.0



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-17  3:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-17  3:46 [PATCH] mm: page_alloc: make compound_page_dtors static Miaohe Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox