Skip to content

Commit

Permalink
compat_hdio_ioctl: Fix a declaration
Browse files Browse the repository at this point in the history
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 d597580 ("generic ...copy_..._user primitives")
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Jens Axboe <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
KAGA-KOKO authored and axboe committed Aug 24, 2017
1 parent 4757084 commit 6a934bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/compat_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 6a934bb

Please sign in to comment.