From: Bart Van Assche Date: Tue, 19 May 2020 04:07:34 +0000 (-0700) Subject: block: Fix type of first compat_put_{,u}long() argument X-Git-Tag: v5.10.7~2496^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c8210a57655a64c0a9b53c58c2ad5d8426c15097;p=platform%2Fkernel%2Flinux-rpi.git block: Fix type of first compat_put_{,u}long() argument This patch fixes the following sparse warnings: block/ioctl.c:209:16: warning: incorrect type in argument 1 (different address spaces) block/ioctl.c:209:16: expected void const volatile [noderef] * block/ioctl.c:209:16: got signed int [usertype] *argp block/ioctl.c:214:16: warning: incorrect type in argument 1 (different address spaces) block/ioctl.c:214:16: expected void const volatile [noderef] * block/ioctl.c:214:16: got unsigned int [usertype] *argp block/ioctl.c:666:40: warning: incorrect type in argument 1 (different address spaces) block/ioctl.c:666:40: expected signed int [usertype] *argp block/ioctl.c:666:40: got void [noderef] *argp block/ioctl.c:672:41: warning: incorrect type in argument 1 (different address spaces) block/ioctl.c:672:41: expected unsigned int [usertype] *argp block/ioctl.c:672:41: got void [noderef] *argp Fixes: 9b81648cb5e3 ("compat_ioctl: simplify up block/ioctl.c") Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Acked-by: Arnd Bergmann Cc: Arnd Bergmann Signed-off-by: Jens Axboe --- diff --git a/block/ioctl.c b/block/ioctl.c index 75c6481..bdb3bbb 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -204,12 +204,12 @@ static int put_u64(u64 __user *argp, u64 val) } #ifdef CONFIG_COMPAT -static int compat_put_long(compat_long_t *argp, long val) +static int compat_put_long(compat_long_t __user *argp, long val) { return put_user(val, argp); } -static int compat_put_ulong(compat_ulong_t *argp, compat_ulong_t val) +static int compat_put_ulong(compat_ulong_t __user *argp, compat_ulong_t val) { return put_user(val, argp); }