summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-11-05 09:34:04 -0500
committerMatthew Wilcox <willy@infradead.org>2018-11-16 16:38:45 -0500
commit5404a7f1c21cfda061712bedf2d06cc0f6c755e9 (patch)
tree507e835673da76e8f62c7ede4b0be2dafe11f549 /lib
parent44a4a66b619a0a83a52e707ebcd80182207bd50e (diff)
XArray tests: Correct some 64-bit assumptions
The test-suite caught these two mistakes when compiled for 32-bit. I had only been running the test-suite in 64-bit mode. Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/test_xarray.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/test_xarray.c b/lib/test_xarray.c
index e5294b20b52f..5f9c14e975a4 100644
--- a/lib/test_xarray.c
+++ b/lib/test_xarray.c
@@ -504,7 +504,7 @@ static noinline void check_multi_store(struct xarray *xa)
504 rcu_read_unlock(); 504 rcu_read_unlock();
505 505
506 /* We can erase multiple values with a single store */ 506 /* We can erase multiple values with a single store */
507 xa_store_order(xa, 0, 63, NULL, GFP_KERNEL); 507 xa_store_order(xa, 0, BITS_PER_LONG - 1, NULL, GFP_KERNEL);
508 XA_BUG_ON(xa, !xa_empty(xa)); 508 XA_BUG_ON(xa, !xa_empty(xa));
509 509
510 /* Even when the first slot is empty but the others aren't */ 510 /* Even when the first slot is empty but the others aren't */
@@ -1101,7 +1101,7 @@ static noinline void check_store_range(struct xarray *xa)
1101 __check_store_range(xa, 4095 + i, 4095 + j); 1101 __check_store_range(xa, 4095 + i, 4095 + j);
1102 __check_store_range(xa, 4096 + i, 4096 + j); 1102 __check_store_range(xa, 4096 + i, 4096 + j);
1103 __check_store_range(xa, 123456 + i, 123456 + j); 1103 __check_store_range(xa, 123456 + i, 123456 + j);
1104 __check_store_range(xa, UINT_MAX + i, UINT_MAX + j); 1104 __check_store_range(xa, (1 << 24) + i, (1 << 24) + j);
1105 } 1105 }
1106 } 1106 }
1107} 1107}