Commit 8a423e54 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] m68k: amiflop __user annotations

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6225d85f
...@@ -1441,6 +1441,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, ...@@ -1441,6 +1441,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
{ {
int drive = iminor(inode) & 3; int drive = iminor(inode) & 3;
static struct floppy_struct getprm; static struct floppy_struct getprm;
void __user *argp = (void __user *)param;
switch(cmd){ switch(cmd){
case FDFMTBEG: case FDFMTBEG:
...@@ -1486,9 +1487,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, ...@@ -1486,9 +1487,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
getprm.head=unit[drive].type->heads; getprm.head=unit[drive].type->heads;
getprm.sect=unit[drive].dtype->sects * unit[drive].type->sect_mult; getprm.sect=unit[drive].dtype->sects * unit[drive].type->sect_mult;
getprm.size=unit[drive].blocks; getprm.size=unit[drive].blocks;
if (copy_to_user((void *)param, if (copy_to_user(argp, &getprm, sizeof(struct floppy_struct)))
(void *)&getprm,
sizeof(struct floppy_struct)))
return -EFAULT; return -EFAULT;
break; break;
case FDSETPRM: case FDSETPRM:
...@@ -1500,8 +1499,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, ...@@ -1500,8 +1499,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
break; break;
#ifdef RAW_IOCTL #ifdef RAW_IOCTL
case IOCTL_RAW_TRACK: case IOCTL_RAW_TRACK:
if (copy_to_user((void *)param, raw_buf, if (copy_to_user(argp, raw_buf, unit[drive].type->read_size))
unit[drive].type->read_size))
return -EFAULT; return -EFAULT;
else else
return unit[drive].type->read_size; return unit[drive].type->read_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment