[v2,01/11] lib/test_bitmap: Force argument of bitmap_parselist_user() to proper address space
diff mbox series

Message ID 20191022172922.61232-2-andriy.shevchenko@linux.intel.com
State New
Headers show
Series
  • gpio: pca953x: Convert to bitmap (extended) API
Related show

Commit Message

Andy Shevchenko Oct. 22, 2019, 5:29 p.m. UTC
Sparse complains:

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

Force argument of bitmap_parselist_user() to proper address space.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 lib/test_bitmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index dc167c13eb39..09aa29a6b562 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -330,7 +330,7 @@  static void __init __test_bitmap_parselist(int is_user)
 
 			set_fs(KERNEL_DS);
 			time = ktime_get();
-			err = bitmap_parselist_user(ptest.in, len,
+			err = bitmap_parselist_user((__force const char __user *)ptest.in, len,
 						    bmap, ptest.nbits);
 			time = ktime_get() - time;
 			set_fs(orig_fs);