[PATCH] hiddev: compat_ptr() returns a void *

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-input@...>, <linux-usb-devel@...>
Cc: LKML <linux-kernel@...>
Date: Tuesday, October 30, 2007 - 11:51 pm

so cast it to unsigned long before passing it to hiddev_ioctl.

This gets rid of:

drivers/hid/usbhid/hiddev.c: In function 'hiddev_compat_ioctl':
drivers/hid/usbhid/hiddev.c:746: warning: passing argument 4 of 'hiddev_ioctl' makes integer from pointer without a cast

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/hid/usbhid/hiddev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 9837adc..5fc4019 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -743,7 +743,7 @@ inval:
 static long hiddev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
 	struct inode *inode = file->f_path.dentry->d_inode;
-	return hiddev_ioctl(inode, file, cmd, compat_ptr(arg));
+	return hiddev_ioctl(inode, file, cmd, (unsigned long)compat_ptr(arg));
 }
 #endif
 
-- 
1.5.3.4

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] hiddev: compat_ptr() returns a void *, Stephen Rothwell, (Tue Oct 30, 11:51 pm)
Re: [PATCH] hiddev: compat_ptr() returns a void *, Jiri Kosina, (Wed Oct 31, 7:27 am)
Re: [PATCH] hiddev: compat_ptr() returns a void *, Stephen Rothwell, (Wed Oct 31, 8:50 pm)