diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-03-31 05:30:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-31 15:18:51 -0500 |
commit | 4d338e1accfc3473f7e453427dfd4f1ebf4dbbe6 (patch) | |
tree | ac6559e533cd4720b5c5b13119b3d10f0ab8b51d /arch/um/drivers/harddog_kern.c | |
parent | 694a464e19b9e3278dbaf6a09fa7c1efec3f8eb5 (diff) |
[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>
Diffstat (limited to 'arch/um/drivers/harddog_kern.c')
-rw-r--r-- | arch/um/drivers/harddog_kern.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c index 49acb2badf32..d18a974735e6 100644 --- a/arch/um/drivers/harddog_kern.c +++ b/arch/um/drivers/harddog_kern.c | |||
@@ -104,7 +104,7 @@ static int harddog_release(struct inode *inode, struct file *file) | |||
104 | 104 | ||
105 | extern int ping_watchdog(int fd); | 105 | extern int ping_watchdog(int fd); |
106 | 106 | ||
107 | static ssize_t harddog_write(struct file *file, const char *data, size_t len, | 107 | static ssize_t harddog_write(struct file *file, const char __user *data, size_t len, |
108 | loff_t *ppos) | 108 | loff_t *ppos) |
109 | { | 109 | { |
110 | /* | 110 | /* |
@@ -118,6 +118,7 @@ static ssize_t harddog_write(struct file *file, const char *data, size_t len, | |||
118 | static int harddog_ioctl(struct inode *inode, struct file *file, | 118 | static int harddog_ioctl(struct inode *inode, struct file *file, |
119 | unsigned int cmd, unsigned long arg) | 119 | unsigned int cmd, unsigned long arg) |
120 | { | 120 | { |
121 | void __user *argp= (void __user *)arg; | ||
121 | static struct watchdog_info ident = { | 122 | static struct watchdog_info ident = { |
122 | WDIOC_SETTIMEOUT, | 123 | WDIOC_SETTIMEOUT, |
123 | 0, | 124 | 0, |
@@ -127,13 +128,12 @@ static int harddog_ioctl(struct inode *inode, struct file *file, | |||
127 | default: | 128 | default: |
128 | return -ENOTTY; | 129 | return -ENOTTY; |
129 | case WDIOC_GETSUPPORT: | 130 | case WDIOC_GETSUPPORT: |
130 | if(copy_to_user((struct harddog_info *)arg, &ident, | 131 | if(copy_to_user(argp, &ident, sizeof(ident))) |
131 | sizeof(ident))) | ||
132 | return -EFAULT; | 132 | return -EFAULT; |
133 | return 0; | 133 | return 0; |
134 | case WDIOC_GETSTATUS: | 134 | case WDIOC_GETSTATUS: |
135 | case WDIOC_GETBOOTSTATUS: | 135 | case WDIOC_GETBOOTSTATUS: |
136 | return put_user(0,(int *)arg); | 136 | return put_user(0,(int __user *)argp); |
137 | case WDIOC_KEEPALIVE: | 137 | case WDIOC_KEEPALIVE: |
138 | return(ping_watchdog(harddog_out_fd)); | 138 | return(ping_watchdog(harddog_out_fd)); |
139 | } | 139 | } |