ChangeSet 1.1318.4.13, 2003/06/17 15:12:58-07:00, greg@kroah.com [PATCH] USB: fix up sparse warnings in drivers/usb/misc/* drivers/usb/misc/auerswald.c | 10 +++++----- drivers/usb/misc/brlvger.c | 10 +++++----- drivers/usb/misc/rio500.c | 10 +++++----- drivers/usb/misc/rio500_usb.h | 2 +- drivers/usb/misc/tiglusb.c | 4 ++-- drivers/usb/misc/usblcd.c | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) diff -Nru a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c --- a/drivers/usb/misc/auerswald.c Wed Jun 18 11:14:39 2003 +++ b/drivers/usb/misc/auerswald.c Wed Jun 18 11:14:39 2003 @@ -149,8 +149,8 @@ /* External data structures / Interface */ typedef struct { - char *buf; /* return buffer for string contents */ - unsigned int bsize; /* size of return buffer */ + char __user *buf; /* return buffer for string contents */ + unsigned int bsize; /* size of return buffer */ } audevinfo_t,*paudevinfo_t; /* IO controls */ @@ -1548,7 +1548,7 @@ /* get a string descriptor for the device */ case IOCTL_AU_DEVINFO: dbg ("IOCTL_AU_DEVINFO"); - if (copy_from_user (&devinfo, (void *) arg, sizeof (audevinfo_t))) { + if (copy_from_user (&devinfo, (void __user *) arg, sizeof (audevinfo_t))) { ret = -EFAULT; break; } @@ -1578,7 +1578,7 @@ } /* Read data from the device */ -static ssize_t auerchar_read (struct file *file, char *buf, size_t count, loff_t * ppos) +static ssize_t auerchar_read (struct file *file, char __user *buf, size_t count, loff_t * ppos) { unsigned long flags; pauerchar_t ccp = (pauerchar_t) file->private_data; @@ -1708,7 +1708,7 @@ /* Write a data block into the right service channel of the device */ -static ssize_t auerchar_write (struct file *file, const char *buf, size_t len, loff_t *ppos) +static ssize_t auerchar_write (struct file *file, const char __user *buf, size_t len, loff_t *ppos) { pauerchar_t ccp = (pauerchar_t) file->private_data; pauerswald_t cp = NULL; diff -Nru a/drivers/usb/misc/brlvger.c b/drivers/usb/misc/brlvger.c --- a/drivers/usb/misc/brlvger.c Wed Jun 18 11:14:39 2003 +++ b/drivers/usb/misc/brlvger.c Wed Jun 18 11:14:39 2003 @@ -109,9 +109,9 @@ static void brlvger_disconnect(struct usb_interface *intf); static int brlvger_open(struct inode *inode, struct file *file); static int brlvger_release(struct inode *inode, struct file *file); -static ssize_t brlvger_write(struct file *file, const char *buffer, +static ssize_t brlvger_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos); -static ssize_t brlvger_read(struct file *file, char *buffer, +static ssize_t brlvger_read(struct file *file, char __user *buffer, size_t count, loff_t *unused_pos); static int brlvger_ioctl(struct inode *inode, struct file *file, unsigned cmd, unsigned long arg); @@ -546,7 +546,7 @@ } static ssize_t -brlvger_write(struct file *file, const char *buffer, +brlvger_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos) { struct brlvger_priv *priv = file->private_data; @@ -655,7 +655,7 @@ } static ssize_t -brlvger_read(struct file *file, char *buffer, +brlvger_read(struct file *file, char __user *buffer, size_t count, loff_t *unused_pos) { struct brlvger_priv *priv = file->private_data; @@ -719,7 +719,7 @@ memcpy(&vi.fwver, priv->fwver, BRLVGER_FWVER_SIZE); memcpy(&vi.serialnum, priv->serialnum, BRLVGER_SERIAL_SIZE); - if(copy_to_user((void *)arg, &vi, sizeof(vi))) + if(copy_to_user((void __user *)arg, &vi, sizeof(vi))) return -EFAULT; return 0; } diff -Nru a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c --- a/drivers/usb/misc/rio500.c Wed Jun 18 11:14:39 2003 +++ b/drivers/usb/misc/rio500.c Wed Jun 18 11:14:39 2003 @@ -111,7 +111,7 @@ { struct RioCommand rio_cmd; struct rio_usb_data *rio = &rio_instance; - void *data; + void __user *data; unsigned char *buffer; int result, requesttype; int retries; @@ -129,7 +129,7 @@ switch (cmd) { case RIO_RECV_COMMAND: - data = (void *) arg; + data = (void __user *) arg; if (data == NULL) break; if (copy_from_user(&rio_cmd, data, sizeof(struct RioCommand))) { @@ -199,7 +199,7 @@ break; case RIO_SEND_COMMAND: - data = (void *) arg; + data = (void __user *) arg; if (data == NULL) break; if (copy_from_user(&rio_cmd, data, sizeof(struct RioCommand))) { @@ -266,7 +266,7 @@ } static ssize_t -write_rio(struct file *file, const char *buffer, +write_rio(struct file *file, const char __user *buffer, size_t count, loff_t * ppos) { struct rio_usb_data *rio = &rio_instance; @@ -352,7 +352,7 @@ } static ssize_t -read_rio(struct file *file, char *buffer, size_t count, loff_t * ppos) +read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos) { struct rio_usb_data *rio = &rio_instance; ssize_t read_count; diff -Nru a/drivers/usb/misc/rio500_usb.h b/drivers/usb/misc/rio500_usb.h --- a/drivers/usb/misc/rio500_usb.h Wed Jun 18 11:14:39 2003 +++ b/drivers/usb/misc/rio500_usb.h Wed Jun 18 11:14:39 2003 @@ -32,6 +32,6 @@ int requesttype; int value; int index; - void *buffer; + void __user *buffer; int timeout; }; diff -Nru a/drivers/usb/misc/tiglusb.c b/drivers/usb/misc/tiglusb.c --- a/drivers/usb/misc/tiglusb.c Wed Jun 18 11:14:39 2003 +++ b/drivers/usb/misc/tiglusb.c Wed Jun 18 11:14:39 2003 @@ -155,7 +155,7 @@ } static ssize_t -tiglusb_read (struct file *filp, char *buf, size_t count, loff_t * f_pos) +tiglusb_read (struct file *filp, char __user *buf, size_t count, loff_t * f_pos) { ptiglusb_t s = (ptiglusb_t) filp->private_data; ssize_t ret = 0; @@ -208,7 +208,7 @@ } static ssize_t -tiglusb_write (struct file *filp, const char *buf, size_t count, loff_t * f_pos) +tiglusb_write (struct file *filp, const char __user *buf, size_t count, loff_t * f_pos) { ptiglusb_t s = (ptiglusb_t) filp->private_data; ssize_t ret = 0; diff -Nru a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c --- a/drivers/usb/misc/usblcd.c Wed Jun 18 11:14:39 2003 +++ b/drivers/usb/misc/usblcd.c Wed Jun 18 11:14:39 2003 @@ -88,12 +88,12 @@ i = (lcd->lcd_dev)->descriptor.bcdDevice; sprintf(buf,"%1d%1d.%1d%1d",(i & 0xF000)>>12,(i & 0xF00)>>8, (i & 0xF0)>>4,(i & 0xF)); - if (copy_to_user((void *)arg,buf,strlen(buf))!=0) + if (copy_to_user((void __user *)arg,buf,strlen(buf))!=0) return -EFAULT; break; case IOCTL_GET_DRV_VERSION: sprintf(buf,DRIVER_VERSION); - if (copy_to_user((void *)arg,buf,strlen(buf))!=0) + if (copy_to_user((void __user *)arg,buf,strlen(buf))!=0) return -EFAULT; break; default: @@ -105,7 +105,7 @@ } static ssize_t -write_lcd(struct file *file, const char *buffer, +write_lcd(struct file *file, const char __user *buffer, size_t count, loff_t * ppos) { struct lcd_usb_data *lcd = &lcd_instance; @@ -171,7 +171,7 @@ } static ssize_t -read_lcd(struct file *file, char *buffer, size_t count, loff_t * ppos) +read_lcd(struct file *file, char __user *buffer, size_t count, loff_t * ppos) { struct lcd_usb_data *lcd = &lcd_instance; ssize_t read_count;