]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
selftests/mm: mark all functions static in split_huge_page_test.c
authorZi Yan <ziy@nvidia.com>
Mon, 18 Aug 2025 18:46:19 +0000 (14:46 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Sep 2025 00:25:11 +0000 (17:25 -0700)
All functions are only used within the file.

Link: https://lkml.kernel.org/r/20250818184622.1521620-3-ziy@nvidia.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: wang lian <lianux.mm@gmail.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Donet Tom <donettom@linux.ibm.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Mariano Pache <npache@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/split_huge_page_test.c

index 4e3408263a77bad27be5548631bac03c8ee42242..001a6ff24bf72b79e22d882cd3cd0f5c6ebf2a5d 100644 (file)
@@ -37,7 +37,7 @@ uint64_t pmd_pagesize;
 #define PFN_MASK     ((1UL<<55)-1)
 #define KPF_THP      (1UL<<22)
 
-int is_backed_by_thp(char *vaddr, int pagemap_file, int kpageflags_file)
+static int is_backed_by_thp(char *vaddr, int pagemap_file, int kpageflags_file)
 {
        uint64_t paddr;
        uint64_t page_flags;
@@ -135,7 +135,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hp
                       rss_anon_before, rss_anon_after);
 }
 
-void split_pmd_zero_pages(void)
+static void split_pmd_zero_pages(void)
 {
        char *one_page;
        int nr_hpages = 4;
@@ -147,7 +147,7 @@ void split_pmd_zero_pages(void)
        free(one_page);
 }
 
-void split_pmd_thp_to_order(int order)
+static void split_pmd_thp_to_order(int order)
 {
        char *one_page;
        size_t len = 4 * pmd_pagesize;
@@ -181,7 +181,7 @@ void split_pmd_thp_to_order(int order)
        free(one_page);
 }
 
-void split_pte_mapped_thp(void)
+static void split_pte_mapped_thp(void)
 {
        char *one_page, *pte_mapped, *pte_mapped2;
        size_t len = 4 * pmd_pagesize;
@@ -264,7 +264,7 @@ void split_pte_mapped_thp(void)
        close(kpageflags_fd);
 }
 
-void split_file_backed_thp(int order)
+static void split_file_backed_thp(int order)
 {
        int status;
        int fd;
@@ -366,7 +366,7 @@ out:
        ksft_exit_fail_msg("Error occurred\n");
 }
 
-bool prepare_thp_fs(const char *xfs_path, char *thp_fs_template,
+static bool prepare_thp_fs(const char *xfs_path, char *thp_fs_template,
                const char **thp_fs_loc)
 {
        if (xfs_path) {
@@ -382,7 +382,7 @@ bool prepare_thp_fs(const char *xfs_path, char *thp_fs_template,
        return true;
 }
 
-void cleanup_thp_fs(const char *thp_fs_loc, bool created_tmp)
+static void cleanup_thp_fs(const char *thp_fs_loc, bool created_tmp)
 {
        int status;
 
@@ -395,8 +395,8 @@ void cleanup_thp_fs(const char *thp_fs_loc, bool created_tmp)
                                   strerror(errno));
 }
 
-int create_pagecache_thp_and_fd(const char *testfile, size_t fd_size, int *fd,
-               char **addr)
+static int create_pagecache_thp_and_fd(const char *testfile, size_t fd_size,
+               int *fd, char **addr)
 {
        size_t i;
        unsigned char buf[1024];
@@ -462,8 +462,8 @@ err_out_unlink:
        return -1;
 }
 
-void split_thp_in_pagecache_to_order_at(size_t fd_size, const char *fs_loc,
-               int order, int offset)
+static void split_thp_in_pagecache_to_order_at(size_t fd_size,
+               const char *fs_loc, int order, int offset)
 {
        int fd;
        char *addr;