[PATCH] uml: sparse cleanups
misc sparse annotations Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
@ -104,7 +104,7 @@ static int harddog_release(struct inode *inode, struct file *file)
|
||||
|
||||
extern int ping_watchdog(int fd);
|
||||
|
||||
static ssize_t harddog_write(struct file *file, const char *data, size_t len,
|
||||
static ssize_t harddog_write(struct file *file, const char __user *data, size_t len,
|
||||
loff_t *ppos)
|
||||
{
|
||||
/*
|
||||
@ -118,6 +118,7 @@ static ssize_t harddog_write(struct file *file, const char *data, size_t len,
|
||||
static int harddog_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
void __user *argp= (void __user *)arg;
|
||||
static struct watchdog_info ident = {
|
||||
WDIOC_SETTIMEOUT,
|
||||
0,
|
||||
@ -127,13 +128,12 @@ static int harddog_ioctl(struct inode *inode, struct file *file,
|
||||
default:
|
||||
return -ENOTTY;
|
||||
case WDIOC_GETSUPPORT:
|
||||
if(copy_to_user((struct harddog_info *)arg, &ident,
|
||||
sizeof(ident)))
|
||||
if(copy_to_user(argp, &ident, sizeof(ident)))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
case WDIOC_GETSTATUS:
|
||||
case WDIOC_GETBOOTSTATUS:
|
||||
return put_user(0,(int *)arg);
|
||||
return put_user(0,(int __user *)argp);
|
||||
case WDIOC_KEEPALIVE:
|
||||
return(ping_watchdog(harddog_out_fd));
|
||||
}
|
||||
|
Reference in New Issue
Block a user