diff mbox series

[-next] mm/ksm: change break_ksm_pmd|pud_entry() to static

Message ID 20221020075913.1046481-1-yangyingliang@huawei.com (mailing list archive)
State New
Headers show
Series [-next] mm/ksm: change break_ksm_pmd|pud_entry() to static | expand

Commit Message

Yang Yingliang Oct. 20, 2022, 7:59 a.m. UTC
break_ksm_pmd|pud_entry() is only used in ksm.c now, change them
to static.

Fixes: 16ee05ec4698 ("mm/ksm: convert break_ksm() to use walk_page_range_vma()")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 mm/ksm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

David Hildenbrand Oct. 20, 2022, 8:31 a.m. UTC | #1
On 20.10.22 09:59, Yang Yingliang wrote:
> break_ksm_pmd|pud_entry() is only used in ksm.c now, change them
> to static.
> 
> Fixes: 16ee05ec4698 ("mm/ksm: convert break_ksm() to use walk_page_range_vma()")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---


Thanks! I'm working on a new version as we speak that e.g., gets rid of 
break_ksm_pud_entry() completely.
diff mbox series

Patch

diff --git a/mm/ksm.c b/mm/ksm.c
index 570a23a0e5d9..c35054311e18 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -420,7 +420,7 @@  static inline bool ksm_test_exit(struct mm_struct *mm)
 	return atomic_read(&mm->mm_users) == 0;
 }
 
-int break_ksm_pud_entry(pud_t *pud, unsigned long addr, unsigned long next,
+static int break_ksm_pud_entry(pud_t *pud, unsigned long addr, unsigned long next,
 			struct mm_walk *walk)
 {
 	/* We only care about page tables to walk to a single base page. */
@@ -429,7 +429,7 @@  int break_ksm_pud_entry(pud_t *pud, unsigned long addr, unsigned long next,
 	return 0;
 }
 
-int break_ksm_pmd_entry(pmd_t *pmd, unsigned long addr, unsigned long next,
+static int break_ksm_pmd_entry(pmd_t *pmd, unsigned long addr, unsigned long next,
 			struct mm_walk *walk)
 {
 	bool *ksm_page = walk->private;