Re: [PATCH] USB: usbtmc: Add support for missing USBTMC-USB488 spec
From: kbuild test robot
Date: Wed Oct 14 2015 - 10:25:47 EST
Hi dave,
[auto build test WARNING on usb/usb-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]
url: https://github.com/0day-ci/linux/commits/dave-penkler/USB-usbtmc-Add-support-for-missing-USBTMC-USB488-spec/20151014-211711
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/usb/class/usbtmc.c:476:28: sparse: incorrect type in argument 1 (different address spaces)
drivers/usb/class/usbtmc.c:476:28: expected void [noderef] <asn:1>*to
drivers/usb/class/usbtmc.c:476:28: got void *<noident>
>> drivers/usb/class/usbtmc.c:507:44: sparse: incorrect type in argument 2 (different address spaces)
drivers/usb/class/usbtmc.c:507:44: expected void const [noderef] <asn:1>*from
drivers/usb/class/usbtmc.c:507:44: got void *<noident>
drivers/usb/class/usbtmc.c:1248:40: sparse: incorrect type in argument 1 (different address spaces)
drivers/usb/class/usbtmc.c:1248:40: expected void [noderef] <asn:1>*to
drivers/usb/class/usbtmc.c:1248:40: got void *<noident>
vim +476 drivers/usb/class/usbtmc.c
470
471 /* bump interrupt bTag */
472 data->iin_bTag += 1;
473 if (data->iin_bTag > 127)
474 data->iin_bTag = 2;
475
> 476 rv = copy_to_user((void *)arg, &stb, sizeof(stb));
477 if (rv)
478 rv = -EFAULT;
479
480 exit:
481 kfree(buffer);
482 return rv;
483
484 }
485
486 static int usbtmc488_ioctl_simple(struct usbtmc_device_data *data,
487 unsigned long arg,
488 unsigned int cmd)
489 {
490 u8 *buffer;
491 struct device *dev;
492 int rv;
493 unsigned int val;
494 u16 wValue;
495
496 dev = &data->intf->dev;
497
498 if (0 == (data->usb488_caps & USBTMC488_CAPABILITY_SIMPLE))
499 return -EINVAL;
500
501 buffer = kmalloc(8, GFP_KERNEL);
502 if (!buffer)
503 return -ENOMEM;
504
505
506 if (cmd == USBTMC488_REQUEST_REN_CONTROL) {
> 507 rv = copy_from_user(&val, (void *)arg, sizeof(val));
508 if (rv) {
509 rv = -EFAULT;
510 goto exit;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/