Skip to content

Commit

Permalink
mm: page_alloc: make compound_page_dtors static
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
MiaoheLin authored and akpm00 committed Jun 19, 2023
1 parent ff71f26 commit cf01724
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf01724

Please sign in to comment.