diff options
| author | Mike Rapoport (Microsoft) <rppt@kernel.org> | 2026-05-11 19:28:09 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-05-28 21:31:47 -0700 |
| commit | 9491c69419761b2539e1e8b0d3d5fafe7acf3e49 (patch) | |
| tree | 2f7afda46877574a3755d3985ec79487bc99c671 /tools | |
| parent | a74c05c81e282758ef3c1436d41db8d73173bd75 (diff) | |
| download | linux-next-history-9491c69419761b2539e1e8b0d3d5fafe7acf3e49.tar.gz | |
selftests/mm: hugepage_settings: use unsigned long in detect_hugetlb_page_size
... instead of size_t to avoid type mismatch in 32 and 64 bit builds.
Link: https://lore.kernel.org/20260511162840.375890-26-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Tested-by: Luiz Capitulino <luizcap@redhat.com>
Tested-by: Sarthak Sharma <sarthak.sharma@arm.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Donet Tom <donettom@linux.ibm.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Lance Yang <lance.yang@linux.dev>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Liam Howlett <liam@infradead.org>
Cc: Li Wang <li.wang@linux.dev>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Nico Pache <npache@redhat.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/testing/selftests/mm/cow.c | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/mm/gup_longterm.c | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/mm/hugepage_settings.c | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/mm/hugepage_settings.h | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/mm/uffd-wp-mremap.c | 6 |
5 files changed, 7 insertions, 7 deletions
diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index 4321f4208fe39..5e571216b8d2e 100644 --- a/tools/testing/selftests/mm/cow.c +++ b/tools/testing/selftests/mm/cow.c @@ -37,7 +37,7 @@ static size_t pmdsize; static int nr_thpsizes; static size_t thpsizes[20]; static int nr_hugetlbsizes; -static size_t hugetlbsizes[10]; +static unsigned long hugetlbsizes[10]; static int gup_fd; static bool has_huge_zeropage; diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c index ab4eaf4feb7c0..96dae0acd11af 100644 --- a/tools/testing/selftests/mm/gup_longterm.c +++ b/tools/testing/selftests/mm/gup_longterm.c @@ -33,7 +33,7 @@ static size_t pagesize; static int nr_hugetlbsizes; -static size_t hugetlbsizes[10]; +static unsigned long hugetlbsizes[10]; static int gup_fd; static __fsword_t get_fs_type(int fd) diff --git a/tools/testing/selftests/mm/hugepage_settings.c b/tools/testing/selftests/mm/hugepage_settings.c index 3d6e4376de06a..fa635667aabb9 100644 --- a/tools/testing/selftests/mm/hugepage_settings.c +++ b/tools/testing/selftests/mm/hugepage_settings.c @@ -398,7 +398,7 @@ bool thp_is_enabled(void) return mode == 1 || mode == 3; } -int detect_hugetlb_page_sizes(size_t sizes[], int max) +int detect_hugetlb_page_sizes(unsigned long sizes[], int max) { DIR *dir = opendir("/sys/kernel/mm/hugepages/"); int count = 0; diff --git a/tools/testing/selftests/mm/hugepage_settings.h b/tools/testing/selftests/mm/hugepage_settings.h index 4c51e9219f6a0..f49bd7fba5125 100644 --- a/tools/testing/selftests/mm/hugepage_settings.h +++ b/tools/testing/selftests/mm/hugepage_settings.h @@ -90,7 +90,7 @@ bool thp_is_enabled(void); /* HugeTLB */ -int detect_hugetlb_page_sizes(size_t sizes[], int max); +int detect_hugetlb_page_sizes(unsigned long sizes[], int max); unsigned long default_huge_page_size(void); unsigned long get_free_hugepages(void); diff --git a/tools/testing/selftests/mm/uffd-wp-mremap.c b/tools/testing/selftests/mm/uffd-wp-mremap.c index 9d67b11c2f287..b44e02840a5e9 100644 --- a/tools/testing/selftests/mm/uffd-wp-mremap.c +++ b/tools/testing/selftests/mm/uffd-wp-mremap.c @@ -12,12 +12,12 @@ #include "uffd-common.h" static int pagemap_fd; -static size_t pagesize; static int nr_pagesizes = 1; +static unsigned long pagesize; static int nr_thpsizes; static size_t thpsizes[20]; static int nr_hugetlbsizes; -static size_t hugetlbsizes[10]; +static unsigned long hugetlbsizes[10]; static int detect_thp_sizes(size_t sizes[], int max) { @@ -245,7 +245,7 @@ out: } struct testcase { - size_t *sizes; + unsigned long *sizes; int *nr_sizes; bool private; bool swapout; |
