[PATCH] m68k: amiflop __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Al Viro and committed by Linus Torvalds 8a423e54 6225d85f

+3 -5
+3 -5
drivers/block/amiflop.c
··· 1441 { 1442 int drive = iminor(inode) & 3; 1443 static struct floppy_struct getprm; 1444 1445 switch(cmd){ 1446 case FDFMTBEG: ··· 1487 getprm.head=unit[drive].type->heads; 1488 getprm.sect=unit[drive].dtype->sects * unit[drive].type->sect_mult; 1489 getprm.size=unit[drive].blocks; 1490 - if (copy_to_user((void *)param, 1491 - (void *)&getprm, 1492 - sizeof(struct floppy_struct))) 1493 return -EFAULT; 1494 break; 1495 case FDSETPRM: ··· 1499 break; 1500 #ifdef RAW_IOCTL 1501 case IOCTL_RAW_TRACK: 1502 - if (copy_to_user((void *)param, raw_buf, 1503 - unit[drive].type->read_size)) 1504 return -EFAULT; 1505 else 1506 return unit[drive].type->read_size;
··· 1441 { 1442 int drive = iminor(inode) & 3; 1443 static struct floppy_struct getprm; 1444 + void __user *argp = (void __user *)param; 1445 1446 switch(cmd){ 1447 case FDFMTBEG: ··· 1486 getprm.head=unit[drive].type->heads; 1487 getprm.sect=unit[drive].dtype->sects * unit[drive].type->sect_mult; 1488 getprm.size=unit[drive].blocks; 1489 + if (copy_to_user(argp, &getprm, sizeof(struct floppy_struct))) 1490 return -EFAULT; 1491 break; 1492 case FDSETPRM: ··· 1500 break; 1501 #ifdef RAW_IOCTL 1502 case IOCTL_RAW_TRACK: 1503 + if (copy_to_user(argp, raw_buf, unit[drive].type->read_size)) 1504 return -EFAULT; 1505 else 1506 return unit[drive].type->read_size;