From: Bart Van Assche <bart.vanassche@wdc.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Bart Van Assche <bart.vanassche@wdc.com>,
Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 2/2] compat_hdio_ioctl: Fix a declaration
Date: Wed, 23 Aug 2017 15:29:11 -0700 [thread overview]
Message-ID: <20170823222911.29453-3-bart.vanassche@wdc.com> (raw)
In-Reply-To: <20170823222911.29453-1-bart.vanassche@wdc.com>
This patch avoids that sparse reports the following warning messages:
block/compat_ioctl.c:85:11: warning: incorrect type in assignment (different address spaces)
block/compat_ioctl.c:85:11: expected unsigned long *[noderef] <asn:1>p
block/compat_ioctl.c:85:11: got void [noderef] <asn:1>*
block/compat_ioctl.c:91:21: warning: incorrect type in argument 1 (different address spaces)
block/compat_ioctl.c:91:21: expected void const volatile [noderef] <asn:1>*<noident>
block/compat_ioctl.c:91:21: got unsigned long *[noderef] <asn:1>p
block/compat_ioctl.c:87:53: warning: dereference of noderef expression
block/compat_ioctl.c:91:21: warning: dereference of noderef expression
Fixes: commit d597580d3737 ("generic ...copy_..._user primitives")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Jens Axboe <axboe@kernel.dk>
---
block/compat_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
index 38554c2ea38a..abaf9d78a206 100644
--- a/block/compat_ioctl.c
+++ b/block/compat_ioctl.c
@@ -79,7 +79,7 @@ static int compat_hdio_getgeo(struct gendisk *disk, struct block_device *bdev,
static int compat_hdio_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
- unsigned long *__user p;
+ unsigned long __user *p;
int error;
p = compat_alloc_user_space(sizeof(unsigned long));
--
2.14.0
next prev parent reply other threads:[~2017-08-23 22:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 22:29 [PATCH 0/2] Two copy_in_user() declaration fixes Bart Van Assche
2017-08-23 22:29 ` [PATCH 1/2] <linux/uaccess.h>: Fix copy_in_user() declaration Bart Van Assche
2017-08-31 21:21 ` Bart Van Assche
2017-08-31 21:24 ` Al Viro
2017-08-23 22:29 ` Bart Van Assche [this message]
2017-08-24 14:40 ` [PATCH 2/2] compat_hdio_ioctl: Fix a declaration 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=20170823222911.29453-3-bart.vanassche@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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