Skip to content

Commit cf01724

Browse files
MiaoheLinakpm00
authored andcommitted
mm: page_alloc: make compound_page_dtors static
It's only used inside page_alloc.c now. So make it static and remove the declaration in mm.h. Link: https://lkml.kernel.org/r/20230617034622.1235913-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent ff71f26 commit cf01724

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

include/linux/mm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,6 @@ enum compound_dtor_id {
12201220
#endif
12211221
NR_COMPOUND_DTORS,
12221222
};
1223-
extern compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS];
12241223

12251224
static inline void folio_set_compound_dtor(struct folio *folio,
12261225
enum compound_dtor_id compound_dtor)

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ const char * const migratetype_names[MIGRATE_TYPES] = {
284284
#endif
285285
};
286286

287-
compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS] = {
287+
static compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS] = {
288288
[NULL_COMPOUND_DTOR] = NULL,
289289
[COMPOUND_PAGE_DTOR] = free_compound_page,
290290
#ifdef CONFIG_HUGETLB_PAGE

0 commit comments

Comments
 (0)