Commit bad77057 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] machzwd warning fix

drivers/char/watchdog/machzwd.c: In function 'zf_ioctl':
drivers/char/watchdog/machzwd.c:327: warning: passing argument 1 of 'zf_ping' makes integer from pointer without a cast

Also some coding-style repairs.
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@ftp.linux.org.uk>
Acked-by: default avatarWim Van Sebroeck <wim@iguana.be>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6a3d0390
...@@ -314,21 +314,21 @@ static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -314,21 +314,21 @@ static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
{ {
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
int __user *p = argp; int __user *p = argp;
switch(cmd){ switch (cmd) {
case WDIOC_GETSUPPORT: case WDIOC_GETSUPPORT:
if (copy_to_user(argp, &zf_info, sizeof(zf_info))) if (copy_to_user(argp, &zf_info, sizeof(zf_info)))
return -EFAULT; return -EFAULT;
break; break;
case WDIOC_GETSTATUS: case WDIOC_GETSTATUS:
return put_user(0, p); return put_user(0, p);
case WDIOC_KEEPALIVE: case WDIOC_KEEPALIVE:
zf_ping(NULL); zf_ping(0);
break; break;
default: default:
return -ENOTTY; return -ENOTTY;
} }
return 0; return 0;
......
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