[PATCH v1 2/2] lib/test_bitmap: Fix address space when test user buffer

From: Andy Shevchenko
Date: Wed Jan 08 2020 - 13:46:18 EST


Force address space to avoid the following warning:

lib/test_bitmap.c:461:53: warning: incorrect type in argument 1 (different address spaces)
lib/test_bitmap.c:461:53: expected char const [noderef] <asn:1> *ubuf
lib/test_bitmap.c:461:53: got char const *in

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
lib/test_bitmap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index af522577a76e..8d3154457ff8 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -458,7 +458,8 @@ static void __init __test_bitmap_parse(int is_user)

set_fs(KERNEL_DS);
time = ktime_get();
- err = bitmap_parse_user(test.in, len, bmap, test.nbits);
+ err = bitmap_parse_user((__force const char __user *)test.in, len,
+ bmap, test.nbits);
time = ktime_get() - time;
set_fs(orig_fs);
} else {
--
2.24.1