Re: [PATCH] Add support for usbfs zerocopy.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Steinar,

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on v4.4-rc3 next-20151203]

url:    https://github.com/0day-ci/linux/commits/Steinar-H-Gunderson/Add-support-for-usbfs-zerocopy/20151206-034258
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   include/linux/compiler.h:228:8: sparse: attribute 'no_sanitize_address': unknown attribute
>> drivers/usb/core/devio.c:1617:13: sparse: incompatible types for operation (>=)
   drivers/usb/core/devio.c:1617:13:    left side has type struct usb_memory *usbm
   drivers/usb/core/devio.c:1617:13:    right side has type unsigned long [unsigned] <noident>
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/fs.h:4,
                    from drivers/usb/core/devio.c:37:
   drivers/usb/core/devio.c: In function 'proc_do_submiturb':
   include/linux/err.h:21:38: warning: comparison between pointer and integer
    #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
                                         ^
   include/linux/compiler.h:166:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/usb/core/devio.c:1617:6: note: in expansion of macro 'IS_ERR_VALUE'
     if (IS_ERR_VALUE(as->usbm)) {
         ^

vim +1617 drivers/usb/core/devio.c

  1601			ret = -EFAULT;
  1602			goto error;
  1603		}
  1604		as = alloc_async(number_of_packets);
  1605		if (!as) {
  1606			ret = -ENOMEM;
  1607			goto error;
  1608		}
  1609	
  1610		u += sizeof(struct async) + sizeof(struct urb) + uurb->buffer_length +
  1611		     num_sgs * sizeof(struct scatterlist);
  1612		ret = usbfs_increase_memory_usage(u);
  1613		if (ret)
  1614			goto error;
  1615		as->mem_usage = u;
  1616		as->usbm = find_memory_area(ps, uurb);
> 1617		if (IS_ERR_VALUE(as->usbm)) {
  1618			ret = PTR_ERR(as->usbm);
  1619			goto error;
  1620		}
  1621	
  1622		if (num_sgs) {
  1623			as->urb->sg = kmalloc(num_sgs * sizeof(struct scatterlist),
  1624					GFP_KERNEL);
  1625			if (!as->urb->sg) {

---
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-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux