diff options
| author | Kirill A. Shutemov <[email protected]> | 2023-12-28 14:47:03 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-01-08 23:27:15 +0000 |
| commit | fd37721803c6e73619108f76ad2e12a9aa5fafaf (patch) | |
| tree | 9f4b4af44314d4e0c38bda7a6558abed65186260 /lib/test_meminit.c | |
| parent | selftests/mm: add separate UFFDIO_MOVE test for PMD splitting (diff) | |
| download | kernel-fd37721803c6e73619108f76ad2e12a9aa5fafaf.tar.gz kernel-fd37721803c6e73619108f76ad2e12a9aa5fafaf.zip | |
mm, treewide: introduce NR_PAGE_ORDERS
NR_PAGE_ORDERS defines the number of page orders supported by the page
allocator, ranging from 0 to MAX_ORDER, MAX_ORDER + 1 in total.
NR_PAGE_ORDERS assists in defining arrays of page orders and allows for
more natural iteration over them.
[[email protected]: fixup for kerneldoc warning]
Link: https://lkml.kernel.org/r/20240101111512.7empzyifq7kxtzk3@box
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kirill A. Shutemov <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Cc: Linus Torvalds <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/test_meminit.c')
| -rw-r--r-- | lib/test_meminit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_meminit.c b/lib/test_meminit.c index 0ae35223d773..0dc173849a54 100644 --- a/lib/test_meminit.c +++ b/lib/test_meminit.c @@ -93,7 +93,7 @@ static int __init test_pages(int *total_failures) int failures = 0, num_tests = 0; int i; - for (i = 0; i <= MAX_ORDER; i++) + for (i = 0; i < NR_PAGE_ORDERS; i++) num_tests += do_alloc_pages_order(i, &failures); REPORT_FAILURES_IN_FN(); |
