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

Subsystems: hid core layer, the rest, usb hid/hidbp drivers (usb keyboards, mice, remote controls, ...)

STALE6892d

3 messages, 2 authors, 2007-11-01 · open the first message on its own page

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

From: Stephen Rothwell <hidden>
Date: 2007-10-31 03:52:03

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 <redacted>
---
 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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

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

From: Jiri Kosina <hidden>
Date: 2007-10-31 11:28:04

On Wed, 31 Oct 2007, Stephen Rothwell wrote:
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 <redacted>
Hi Stephen,

I already have this fixed in my tree, sorry.

Thanks a lot,

-- 
Jiri Kosina

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

From: Stephen Rothwell <hidden>
Date: 2007-11-01 00:51:17

On Wed, 31 Oct 2007 12:27:24 +0100 (CET) Jiri Kosina [off-list ref] wrote:
I already have this fixed in my tree, sorry.
As long as it gets fixed, I don't mind.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help