Skip to content

Commit 17b6753

Browse files
andy-shevtorvalds
authored andcommitted
lib/test_bitmap: force argument of bitmap_parselist_user() to proper address space
Patch series "gpio: pca953x: Convert to bitmap (extended) API", v2. While converting gpio-pca953x driver to bitmap API, I noticed that we have no function to replace bits. So, that's how patch 7 appears. First 6 patches are preparatory of the test suite (including some warning fixes, etc). Patches 8-9 are preparatory for the GPIO driver to be easier converted to bitmap API, conversion to which happens in patch 10. Patch 11 contains simple indentation fixes. This patch (of 11): 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. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Cc: Bartosz Golaszewski <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Yury Norov <[email protected]> Cc: William Breathitt Gray <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Thomas Petazzoni <[email protected]> Cc: Marek Vasut <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 0fb9dc2 commit 17b6753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/test_bitmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static void __init __test_bitmap_parselist(int is_user)
330330

331331
set_fs(KERNEL_DS);
332332
time = ktime_get();
333-
err = bitmap_parselist_user(ptest.in, len,
333+
err = bitmap_parselist_user((__force const char __user *)ptest.in, len,
334334
bmap, ptest.nbits);
335335
time = ktime_get() - time;
336336
set_fs(orig_fs);

0 commit comments

Comments
 (0)