Skip to content

Commit

Permalink
[PATCH] machzwd warning fix
Browse files Browse the repository at this point in the history
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: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@ftp.linux.org.uk>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 18, 2007
1 parent 6a3d039 commit bad7705
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions drivers/char/watchdog/machzwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,21 +314,21 @@ static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
switch(cmd){
case WDIOC_GETSUPPORT:
if (copy_to_user(argp, &zf_info, sizeof(zf_info)))
return -EFAULT;
break;
switch (cmd) {
case WDIOC_GETSUPPORT:
if (copy_to_user(argp, &zf_info, sizeof(zf_info)))
return -EFAULT;
break;

case WDIOC_GETSTATUS:
return put_user(0, p);
case WDIOC_GETSTATUS:
return put_user(0, p);

case WDIOC_KEEPALIVE:
zf_ping(NULL);
break;
case WDIOC_KEEPALIVE:
zf_ping(0);
break;

default:
return -ENOTTY;
default:
return -ENOTTY;
}

return 0;
Expand Down

0 comments on commit bad7705

Please sign in to comment.