From: Andrew Morton Date: Thu, 17 Nov 2005 17:47:02 +0000 (-0800) Subject: [PATCH] USB: usbdevfs_ioctl 32bit fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=777da5905e82695d1dd73eee6cfe50bd486d8fe9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] USB: usbdevfs_ioctl 32bit fix drivers/usb/core/devio.c: In function `proc_ioctl_compat': drivers/usb/core/devio.c:1401: warning: passing arg 1 of `compat_ptr' makes integer from pointer without a cast NFI if this is correct... Cc: Pete Zaitcev Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds --- diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 942cd437dc48..ec138852848b 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -1392,7 +1392,7 @@ static int proc_ioctl_default(struct dev_state *ps, void __user *arg) } #ifdef CONFIG_COMPAT -static int proc_ioctl_compat(struct dev_state *ps, void __user *arg) +static int proc_ioctl_compat(struct dev_state *ps, compat_uptr_t arg) { struct usbdevfs_ioctl32 __user *uioc; struct usbdevfs_ioctl ctrl; @@ -1511,7 +1511,7 @@ static int usbdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd case USBDEVFS_IOCTL32: snoop(&dev->dev, "%s: IOCTL\n", __FUNCTION__); - ret = proc_ioctl_compat(ps, p); + ret = proc_ioctl_compat(ps, (compat_uptr_t)(long)p); break; #endif