From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Ming Lei <ming.lei@redhat.com>,
Alexander Potapenko <glider@google.com>,
Bart Van Assche <bvanassche@acm.org>,
Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH v3 1/4] block: Fix type of first compat_put_{,u}long() argument
Date: Mon, 18 May 2020 21:07:34 -0700 [thread overview]
Message-ID: <20200519040737.4531-2-bvanassche@acm.org> (raw)
In-Reply-To: <20200519040737.4531-1-bvanassche@acm.org>
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] <asn:1> *
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] <asn:1> *
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] <asn:1> *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] <asn:1> *argp
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Fixes: 9b81648cb5e3 ("compat_ioctl: simplify up block/ioctl.c")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/ioctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/ioctl.c b/block/ioctl.c
index 75c64811b534..bdb3bbb253d9 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);
}
next prev parent reply other threads:[~2020-05-19 4:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 4:07 [PATCH v3 0/4] Block layer patches for kernel v5.8 Bart Van Assche
2020-05-19 4:07 ` Bart Van Assche [this message]
2020-05-19 8:34 ` [PATCH v3 1/4] block: Fix type of first compat_put_{,u}long() argument Johannes Thumshirn
2020-05-19 4:07 ` [PATCH v3 2/4] bio.h: Declare the arguments of the bio iteration functions const Bart Van Assche
2020-05-19 8:35 ` Johannes Thumshirn
2020-05-19 4:07 ` [PATCH v3 3/4] block: Document the bio_vec properties Bart Van Assche
2020-05-19 15:21 ` Christoph Hellwig
2020-05-19 4:07 ` [PATCH v3 4/4] null_blk: Zero-initialize read buffers in non-memory-backed mode Bart Van Assche
2020-05-19 15:40 ` [PATCH v3 0/4] Block layer patches for kernel v5.8 Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200519040737.4531-2-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=arnd@arndb.de \
--cc=axboe@kernel.dk \
--cc=glider@google.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).