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

From: Andy Shevchenko
Date: Thu Jan 09 2020 - 05:36:08 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>
---
v2: no changes
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 707b0389db35..61ed71c1daba 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