drivers/usb/class/usbtmc.c:498:22: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 3 weeks ago
config: openrisc-randconfig-s031-20200710 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-37-gc9676a3b-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/usb/class/usbtmc.c:498:22: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char *__pu_addr @@ got unsigned char [noderef] [usertype] __user * @@
drivers/usb/class/usbtmc.c:498:22: sparse: expected unsigned char *__pu_addr
>> drivers/usb/class/usbtmc.c:498:22: sparse: got unsigned char [noderef] [usertype] __user *
drivers/usb/class/usbtmc.c:556:14: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char *__pu_addr @@ got unsigned char [noderef] [usertype] __user * @@
drivers/usb/class/usbtmc.c:556:14: sparse: expected unsigned char *__pu_addr
drivers/usb/class/usbtmc.c:556:14: sparse: got unsigned char [noderef] [usertype] __user *
drivers/usb/class/usbtmc.c:584:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user *arg @@
drivers/usb/class/usbtmc.c:584:13: sparse: expected unsigned int const *__gu_addr
drivers/usb/class/usbtmc.c:584:13: sparse: got unsigned int [noderef] [usertype] __user *arg
>> drivers/usb/class/usbtmc.c:1033:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int *__pu_addr @@ got unsigned int [noderef] __user * @@
drivers/usb/class/usbtmc.c:1033:13: sparse: expected unsigned int *__pu_addr
>> drivers/usb/class/usbtmc.c:1033:13: sparse: got unsigned int [noderef] __user *
drivers/usb/class/usbtmc.c:1244:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int *__pu_addr @@ got unsigned int [noderef] __user * @@
drivers/usb/class/usbtmc.c:1244:13: sparse: expected unsigned int *__pu_addr
drivers/usb/class/usbtmc.c:1244:13: sparse: got unsigned int [noderef] __user *
>> drivers/usb/class/usbtmc.c:1265:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int *__pu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/usb/class/usbtmc.c:1265:13: sparse: expected unsigned int *__pu_addr
drivers/usb/class/usbtmc.c:1265:13: sparse: got unsigned int [noderef] [usertype] __user *
drivers/usb/class/usbtmc.c:1952:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int *__pu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/usb/class/usbtmc.c:1952:16: sparse: expected unsigned int *__pu_addr
drivers/usb/class/usbtmc.c:1952:16: sparse: got unsigned int [noderef] [usertype] __user *
drivers/usb/class/usbtmc.c:1963:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/usb/class/usbtmc.c:1963:13: sparse: expected unsigned int const *__gu_addr
drivers/usb/class/usbtmc.c:1963:13: sparse: got unsigned int [noderef] [usertype] __user *
drivers/usb/class/usbtmc.c:2099:26: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int *__pu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/usb/class/usbtmc.c:2099:26: sparse: expected unsigned int *__pu_addr
drivers/usb/class/usbtmc.c:2099:26: sparse: got unsigned int [noderef] [usertype] __user *
>> drivers/usb/class/usbtmc.c:2104:26: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char *__pu_addr @@ got unsigned char [noderef] __user * @@
drivers/usb/class/usbtmc.c:2104:26: sparse: expected unsigned char *__pu_addr
drivers/usb/class/usbtmc.c:2104:26: sparse: got unsigned char [noderef] __user *
drivers/usb/class/usbtmc.c:2138:26: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char *__pu_addr @@ got unsigned char [noderef] [usertype] __user * @@
drivers/usb/class/usbtmc.c:2138:26: sparse: expected unsigned char *__pu_addr
drivers/usb/class/usbtmc.c:2138:26: sparse: got unsigned char [noderef] [usertype] __user *
drivers/usb/class/usbtmc.c:2143:26: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const *__gu_addr @@ got unsigned char [noderef] __user * @@
drivers/usb/class/usbtmc.c:2143:26: sparse: expected unsigned char const *__gu_addr
drivers/usb/class/usbtmc.c:2143:26: sparse: got unsigned char [noderef] __user *
arch/openrisc/include/asm/cmpxchg.h:101:29: sparse: sparse: shift too big (32) for type int
include/linux/uaccess.h:131:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] __user *to @@
include/linux/uaccess.h:131:38: sparse: expected void *to
include/linux/uaccess.h:131:38: sparse: got void [noderef] __user *to
include/linux/uaccess.h:131:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got void const *from @@
include/linux/uaccess.h:131:42: sparse: expected void const [noderef] __user *from
include/linux/uaccess.h:131:42: sparse: got void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] __user *from @@
arch/openrisc/include/asm/uaccess.h:246:55: sparse: expected void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: got void const [noderef] __user *from
include/linux/uaccess.h:131:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] __user *to @@
include/linux/uaccess.h:131:38: sparse: expected void *to
include/linux/uaccess.h:131:38: sparse: got void [noderef] __user *to
include/linux/uaccess.h:131:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got void const *from @@
include/linux/uaccess.h:131:42: sparse: expected void const [noderef] __user *from
include/linux/uaccess.h:131:42: sparse: got void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] __user *from @@
arch/openrisc/include/asm/uaccess.h:246:55: sparse: expected void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: got void const [noderef] __user *from
include/linux/uaccess.h:131:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] __user *to @@
include/linux/uaccess.h:131:38: sparse: expected void *to
include/linux/uaccess.h:131:38: sparse: got void [noderef] __user *to
include/linux/uaccess.h:131:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got void const *from @@
include/linux/uaccess.h:131:42: sparse: expected void const [noderef] __user *from
include/linux/uaccess.h:131:42: sparse: got void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] __user *from @@
arch/openrisc/include/asm/uaccess.h:246:55: sparse: expected void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: got void const [noderef] __user *from
--
>> drivers/hid/hid-roccat.c:393:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int *__pu_addr @@ got int [noderef] __user * @@
drivers/hid/hid-roccat.c:393:21: sparse: expected int *__pu_addr
>> drivers/hid/hid-roccat.c:393:21: sparse: got int [noderef] __user *
include/linux/uaccess.h:131:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *to @@ got void [noderef] __user *to @@
include/linux/uaccess.h:131:38: sparse: expected void *to
include/linux/uaccess.h:131:38: sparse: got void [noderef] __user *to
include/linux/uaccess.h:131:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got void const *from @@
include/linux/uaccess.h:131:42: sparse: expected void const [noderef] __user *from
include/linux/uaccess.h:131:42: sparse: got void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] __user *from @@
arch/openrisc/include/asm/uaccess.h:246:55: sparse: expected void const *from
arch/openrisc/include/asm/uaccess.h:246:55: sparse: got void const [noderef] __user *from
--
>> drivers/clk/clk-hsdk-pll.c:415:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem *spec_regs @@
drivers/clk/clk-hsdk-pll.c:415:24: sparse: expected void *addr
>> drivers/clk/clk-hsdk-pll.c:415:24: sparse: got void [noderef] __iomem *spec_regs
>> drivers/clk/clk-hsdk-pll.c:417:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem *regs @@
drivers/clk/clk-hsdk-pll.c:417:24: sparse: expected void *addr
>> drivers/clk/clk-hsdk-pll.c:417:24: sparse: got void [noderef] __iomem *regs
--
>> drivers/tty/serial/altera_uart.c:628:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got unsigned char [noderef] __iomem *membase @@
drivers/tty/serial/altera_uart.c:628:29: sparse: expected void *addr
>> drivers/tty/serial/altera_uart.c:628:29: sparse: got unsigned char [noderef] __iomem *membase
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
--
>> drivers/tty/serial/xilinx_uartps.c:988:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got unsigned char [noderef] __iomem *membase @@
drivers/tty/serial/xilinx_uartps.c:988:21: sparse: expected void *addr
>> drivers/tty/serial/xilinx_uartps.c:988:21: sparse: got unsigned char [noderef] __iomem *membase
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
drivers/tty/serial/xilinx_uartps.c:553:33: sparse: sparse: context imbalance in 'cdns_uart_clk_notifier_cb' - different lock contexts for basic block
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
vim +498 drivers/usb/class/usbtmc.c
0e59088e7ff7ae Guido Kiener 2018-09-12 477
4f3c8d6eddc272 Guido Kiener 2018-07-18 478 static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
dbf3e7f654c0f0 Dave Penkler 2016-01-27 479 void __user *arg)
dbf3e7f654c0f0 Dave Penkler 2016-01-27 480 {
4f3c8d6eddc272 Guido Kiener 2018-07-18 481 struct usbtmc_device_data *data = file_data->data;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 482 struct device *dev = &data->intf->dev;
4f3c8d6eddc272 Guido Kiener 2018-07-18 483 int srq_asserted = 0;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 484 u8 *buffer;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 485 u8 tag;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 486 __u8 stb;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 487 int rv;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 488
dbf3e7f654c0f0 Dave Penkler 2016-01-27 489 dev_dbg(dev, "Enter ioctl_read_stb iin_ep_present: %d\n",
dbf3e7f654c0f0 Dave Penkler 2016-01-27 490 data->iin_ep_present);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 491
4f3c8d6eddc272 Guido Kiener 2018-07-18 492 spin_lock_irq(&data->dev_lock);
4f3c8d6eddc272 Guido Kiener 2018-07-18 493 srq_asserted = atomic_xchg(&file_data->srq_asserted, srq_asserted);
4f3c8d6eddc272 Guido Kiener 2018-07-18 494 if (srq_asserted) {
4f3c8d6eddc272 Guido Kiener 2018-07-18 495 /* a STB with SRQ is already received */
4f3c8d6eddc272 Guido Kiener 2018-07-18 496 stb = file_data->srq_byte;
4f3c8d6eddc272 Guido Kiener 2018-07-18 497 spin_unlock_irq(&data->dev_lock);
4f3c8d6eddc272 Guido Kiener 2018-07-18 @498 rv = put_user(stb, (__u8 __user *)arg);
4f3c8d6eddc272 Guido Kiener 2018-07-18 499 dev_dbg(dev, "stb:0x%02x with srq received %d\n",
4f3c8d6eddc272 Guido Kiener 2018-07-18 500 (unsigned int)stb, rv);
4f3c8d6eddc272 Guido Kiener 2018-07-18 501 return rv;
4f3c8d6eddc272 Guido Kiener 2018-07-18 502 }
4f3c8d6eddc272 Guido Kiener 2018-07-18 503 spin_unlock_irq(&data->dev_lock);
4f3c8d6eddc272 Guido Kiener 2018-07-18 504
dbf3e7f654c0f0 Dave Penkler 2016-01-27 505 buffer = kmalloc(8, GFP_KERNEL);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 506 if (!buffer)
dbf3e7f654c0f0 Dave Penkler 2016-01-27 507 return -ENOMEM;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 508
dbf3e7f654c0f0 Dave Penkler 2016-01-27 509 atomic_set(&data->iin_data_valid, 0);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 510
dbf3e7f654c0f0 Dave Penkler 2016-01-27 511 rv = usb_control_msg(data->usb_dev,
dbf3e7f654c0f0 Dave Penkler 2016-01-27 512 usb_rcvctrlpipe(data->usb_dev, 0),
dbf3e7f654c0f0 Dave Penkler 2016-01-27 513 USBTMC488_REQUEST_READ_STATUS_BYTE,
dbf3e7f654c0f0 Dave Penkler 2016-01-27 514 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
dbf3e7f654c0f0 Dave Penkler 2016-01-27 515 data->iin_bTag,
dbf3e7f654c0f0 Dave Penkler 2016-01-27 516 data->ifnum,
63c97bbad5ae5e Guido Kiener 2018-09-12 517 buffer, 0x03, USB_CTRL_GET_TIMEOUT);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 518 if (rv < 0) {
dbf3e7f654c0f0 Dave Penkler 2016-01-27 519 dev_err(dev, "stb usb_control_msg returned %d\n", rv);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 520 goto exit;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 521 }
dbf3e7f654c0f0 Dave Penkler 2016-01-27 522
dbf3e7f654c0f0 Dave Penkler 2016-01-27 523 if (buffer[0] != USBTMC_STATUS_SUCCESS) {
dbf3e7f654c0f0 Dave Penkler 2016-01-27 524 dev_err(dev, "control status returned %x\n", buffer[0]);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 525 rv = -EIO;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 526 goto exit;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 527 }
dbf3e7f654c0f0 Dave Penkler 2016-01-27 528
dbf3e7f654c0f0 Dave Penkler 2016-01-27 529 if (data->iin_ep_present) {
dbf3e7f654c0f0 Dave Penkler 2016-01-27 530 rv = wait_event_interruptible_timeout(
dbf3e7f654c0f0 Dave Penkler 2016-01-27 531 data->waitq,
dbf3e7f654c0f0 Dave Penkler 2016-01-27 532 atomic_read(&data->iin_data_valid) != 0,
048c6d88a02147 Guido Kiener 2018-07-18 533 file_data->timeout);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 534 if (rv < 0) {
dbf3e7f654c0f0 Dave Penkler 2016-01-27 535 dev_dbg(dev, "wait interrupted %d\n", rv);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 536 goto exit;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 537 }
dbf3e7f654c0f0 Dave Penkler 2016-01-27 538
dbf3e7f654c0f0 Dave Penkler 2016-01-27 539 if (rv == 0) {
dbf3e7f654c0f0 Dave Penkler 2016-01-27 540 dev_dbg(dev, "wait timed out\n");
19e6c57e96169c Guido Kiener 2018-07-18 541 rv = -ETIMEDOUT;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 542 goto exit;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 543 }
dbf3e7f654c0f0 Dave Penkler 2016-01-27 544
dbf3e7f654c0f0 Dave Penkler 2016-01-27 545 tag = data->bNotify1 & 0x7f;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 546 if (tag != data->iin_bTag) {
dbf3e7f654c0f0 Dave Penkler 2016-01-27 547 dev_err(dev, "expected bTag %x got %x\n",
dbf3e7f654c0f0 Dave Penkler 2016-01-27 548 data->iin_bTag, tag);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 549 }
dbf3e7f654c0f0 Dave Penkler 2016-01-27 550
dbf3e7f654c0f0 Dave Penkler 2016-01-27 551 stb = data->bNotify2;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 552 } else {
dbf3e7f654c0f0 Dave Penkler 2016-01-27 553 stb = buffer[2];
dbf3e7f654c0f0 Dave Penkler 2016-01-27 554 }
dbf3e7f654c0f0 Dave Penkler 2016-01-27 555
4f3c8d6eddc272 Guido Kiener 2018-07-18 556 rv = put_user(stb, (__u8 __user *)arg);
4f3c8d6eddc272 Guido Kiener 2018-07-18 557 dev_dbg(dev, "stb:0x%02x received %d\n", (unsigned int)stb, rv);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 558
dbf3e7f654c0f0 Dave Penkler 2016-01-27 559 exit:
dbf3e7f654c0f0 Dave Penkler 2016-01-27 560 /* bump interrupt bTag */
dbf3e7f654c0f0 Dave Penkler 2016-01-27 561 data->iin_bTag += 1;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 562 if (data->iin_bTag > 127)
dbf3e7f654c0f0 Dave Penkler 2016-01-27 563 /* 1 is for SRQ see USBTMC-USB488 subclass spec section 4.3.1 */
dbf3e7f654c0f0 Dave Penkler 2016-01-27 564 data->iin_bTag = 2;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 565
dbf3e7f654c0f0 Dave Penkler 2016-01-27 566 kfree(buffer);
dbf3e7f654c0f0 Dave Penkler 2016-01-27 567 return rv;
dbf3e7f654c0f0 Dave Penkler 2016-01-27 568 }
dbf3e7f654c0f0 Dave Penkler 2016-01-27 569
739240a9f6ac4d Guido Kiener 2018-09-12 570 static int usbtmc488_ioctl_wait_srq(struct usbtmc_file_data *file_data,
739240a9f6ac4d Guido Kiener 2018-09-12 571 __u32 __user *arg)
739240a9f6ac4d Guido Kiener 2018-09-12 572 {
739240a9f6ac4d Guido Kiener 2018-09-12 573 struct usbtmc_device_data *data = file_data->data;
739240a9f6ac4d Guido Kiener 2018-09-12 574 struct device *dev = &data->intf->dev;
739240a9f6ac4d Guido Kiener 2018-09-12 575 int rv;
739240a9f6ac4d Guido Kiener 2018-09-12 576 u32 timeout;
739240a9f6ac4d Guido Kiener 2018-09-12 577 unsigned long expire;
739240a9f6ac4d Guido Kiener 2018-09-12 578
739240a9f6ac4d Guido Kiener 2018-09-12 579 if (!data->iin_ep_present) {
739240a9f6ac4d Guido Kiener 2018-09-12 580 dev_dbg(dev, "no interrupt endpoint present\n");
739240a9f6ac4d Guido Kiener 2018-09-12 581 return -EFAULT;
739240a9f6ac4d Guido Kiener 2018-09-12 582 }
739240a9f6ac4d Guido Kiener 2018-09-12 583
739240a9f6ac4d Guido Kiener 2018-09-12 @584 if (get_user(timeout, arg))
739240a9f6ac4d Guido Kiener 2018-09-12 585 return -EFAULT;
739240a9f6ac4d Guido Kiener 2018-09-12 586
739240a9f6ac4d Guido Kiener 2018-09-12 587 expire = msecs_to_jiffies(timeout);
739240a9f6ac4d Guido Kiener 2018-09-12 588
739240a9f6ac4d Guido Kiener 2018-09-12 589 mutex_unlock(&data->io_mutex);
739240a9f6ac4d Guido Kiener 2018-09-12 590
739240a9f6ac4d Guido Kiener 2018-09-12 591 rv = wait_event_interruptible_timeout(
739240a9f6ac4d Guido Kiener 2018-09-12 592 data->waitq,
739240a9f6ac4d Guido Kiener 2018-09-12 593 atomic_read(&file_data->srq_asserted) != 0 ||
739240a9f6ac4d Guido Kiener 2018-09-12 594 atomic_read(&file_data->closing),
739240a9f6ac4d Guido Kiener 2018-09-12 595 expire);
739240a9f6ac4d Guido Kiener 2018-09-12 596
739240a9f6ac4d Guido Kiener 2018-09-12 597 mutex_lock(&data->io_mutex);
739240a9f6ac4d Guido Kiener 2018-09-12 598
739240a9f6ac4d Guido Kiener 2018-09-12 599 /* Note! disconnect or close could be called in the meantime */
739240a9f6ac4d Guido Kiener 2018-09-12 600 if (atomic_read(&file_data->closing) || data->zombie)
739240a9f6ac4d Guido Kiener 2018-09-12 601 rv = -ENODEV;
739240a9f6ac4d Guido Kiener 2018-09-12 602
739240a9f6ac4d Guido Kiener 2018-09-12 603 if (rv < 0) {
739240a9f6ac4d Guido Kiener 2018-09-12 604 /* dev can be invalid now! */
739240a9f6ac4d Guido Kiener 2018-09-12 605 pr_debug("%s - wait interrupted %d\n", __func__, rv);
739240a9f6ac4d Guido Kiener 2018-09-12 606 return rv;
739240a9f6ac4d Guido Kiener 2018-09-12 607 }
739240a9f6ac4d Guido Kiener 2018-09-12 608
739240a9f6ac4d Guido Kiener 2018-09-12 609 if (rv == 0) {
739240a9f6ac4d Guido Kiener 2018-09-12 610 dev_dbg(dev, "%s - wait timed out\n", __func__);
739240a9f6ac4d Guido Kiener 2018-09-12 611 return -ETIMEDOUT;
739240a9f6ac4d Guido Kiener 2018-09-12 612 }
739240a9f6ac4d Guido Kiener 2018-09-12 613
739240a9f6ac4d Guido Kiener 2018-09-12 614 dev_dbg(dev, "%s - srq asserted\n", __func__);
739240a9f6ac4d Guido Kiener 2018-09-12 615 return 0;
739240a9f6ac4d Guido Kiener 2018-09-12 616 }
739240a9f6ac4d Guido Kiener 2018-09-12 617
:::::: The code at line 498 was first introduced by commit
:::::: 4f3c8d6eddc272b386464524235440a418ed2029 usb: usbtmc: Support Read Status Byte with SRQ per file
:::::: TO: Guido Kiener <guido(a)kiener-muenchen.de>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[android-goldfish:android-5.4 2747/9999] sound/soc/hisilicon/hi3660-i2s.c:377:15: error: implicit declaration of function 'devm_pinctrl_get'
by kernel test robot
tree: https://android.googlesource.com/kernel/goldfish android-5.4
head: 33f6768a35188c80518123ee75637015d01b7f32
commit: 6e7f3a3fda62f5e6be8e478f0101164f5936251c [2747/9999] ANDROID: sound: Add hikey960 i2s audio driver
config: x86_64-randconfig-r032-20200710 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 6e7f3a3fda62f5e6be8e478f0101164f5936251c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> sound/soc/hisilicon/hi3660-i2s.c:377:15: error: implicit declaration of function 'devm_pinctrl_get' [-Werror,-Wimplicit-function-declaration]
i2s->pctrl = devm_pinctrl_get(dev);
^
sound/soc/hisilicon/hi3660-i2s.c:377:15: note: did you mean 'of_pinctrl_get'?
include/linux/pinctrl/pinctrl.h:193:21: note: 'of_pinctrl_get' declared here
struct pinctrl_dev *of_pinctrl_get(struct device_node *np)
^
>> sound/soc/hisilicon/hi3660-i2s.c:377:13: warning: incompatible integer to pointer conversion assigning to 'struct pinctrl *' from 'int' [-Wint-conversion]
i2s->pctrl = devm_pinctrl_get(dev);
^ ~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/hisilicon/hi3660-i2s.c:384:21: error: implicit declaration of function 'pinctrl_lookup_state' [-Werror,-Wimplicit-function-declaration]
i2s->pin_default = pinctrl_lookup_state(i2s->pctrl,
^
>> sound/soc/hisilicon/hi3660-i2s.c:384:19: warning: incompatible integer to pointer conversion assigning to 'struct pinctrl_state *' from 'int' [-Wint-conversion]
i2s->pin_default = pinctrl_lookup_state(i2s->pctrl,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/hisilicon/hi3660-i2s.c:394:6: error: implicit declaration of function 'pinctrl_select_state' [-Werror,-Wimplicit-function-declaration]
if (pinctrl_select_state(i2s->pctrl, i2s->pin_default)) {
^
sound/soc/hisilicon/hi3660-i2s.c:394:6: note: did you mean 'pinctrl_lookup_state'?
sound/soc/hisilicon/hi3660-i2s.c:384:21: note: 'pinctrl_lookup_state' declared here
i2s->pin_default = pinctrl_lookup_state(i2s->pctrl,
^
>> sound/soc/hisilicon/hi3660-i2s.c:422:2: error: implicit declaration of function 'pinctrl_put' [-Werror,-Wimplicit-function-declaration]
pinctrl_put(i2s->pctrl);
^
2 warnings and 4 errors generated.
vim +/devm_pinctrl_get +377 sound/soc/hisilicon/hi3660-i2s.c
332
333 static int hi3660_i2s_probe(struct platform_device *pdev)
334 {
335 struct device *dev = &pdev->dev;
336 struct hi3660_i2s *i2s;
337 struct resource *res;
338 int ret;
339
340 i2s = devm_kzalloc(dev, sizeof(*i2s), GFP_KERNEL);
341 if (!i2s)
342 return -ENOMEM;
343
344 i2s->dev = dev;
345 spin_lock_init(&i2s->lock);
346
347 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
348 if (!res) {
349 ret = -ENODEV;
350 return ret;
351 }
352 i2s->base_phys = (phys_addr_t)res->start;
353
354 i2s->dai = dai_init;
355 dev_set_drvdata(&pdev->dev, i2s);
356
357 i2s->base = devm_ioremap_resource(dev, res);
358 if (IS_ERR(i2s->base)) {
359 dev_err(&pdev->dev, "ioremap failed\n");
360 ret = PTR_ERR(i2s->base);
361 return ret;
362 }
363
364 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
365 if (!res) {
366 ret = -ENODEV;
367 return ret;
368 }
369 i2s->base_syscon = devm_ioremap(dev, res->start, resource_size(res));
370 if (IS_ERR(i2s->base_syscon)) {
371 dev_err(&pdev->dev, "ioremap failed\n");
372 ret = PTR_ERR(i2s->base_syscon);
373 return ret;
374 }
375
376 /* i2s iomux config */
> 377 i2s->pctrl = devm_pinctrl_get(dev);
378 if (IS_ERR(i2s->pctrl)) {
379 dev_err(dev, "could not get pinctrl\n");
380 ret = -EIO;
381 return ret;
382 }
383
> 384 i2s->pin_default = pinctrl_lookup_state(i2s->pctrl,
385 PINCTRL_STATE_DEFAULT);
386 if (IS_ERR(i2s->pin_default)) {
387 dev_err(dev,
388 "could not get default state (%li)\n",
389 PTR_ERR(i2s->pin_default));
390 ret = -EIO;
391 return ret;
392 }
393
> 394 if (pinctrl_select_state(i2s->pctrl, i2s->pin_default)) {
395 dev_err(dev, "could not set pins to default state\n");
396 ret = -EIO;
397 return ret;
398 }
399
400 ret = devm_snd_dmaengine_pcm_register(&pdev->dev,
401 &dmaengine_pcm_config, 0);
402 if (ret)
403 return ret;
404
405 ret = snd_soc_register_component(&pdev->dev, &component_driver,
406 &i2s->dai, 1);
407 if (ret) {
408 dev_err(&pdev->dev, "Failed to register dai\n");
409 return ret;
410 }
411
412 return 0;
413 }
414
415 static int hi3660_i2s_remove(struct platform_device *pdev)
416 {
417 struct hi3660_i2s *i2s = dev_get_drvdata(&pdev->dev);
418
419 snd_soc_unregister_component(&pdev->dev);
420 dev_set_drvdata(&pdev->dev, NULL);
421
> 422 pinctrl_put(i2s->pctrl);
423
424 return 0;
425 }
426
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[linux-next:master 2656/6900] drivers/soc/qcom/qcom-geni-se.c:819:11: error: implicit declaration of function 'of_get_next_parent'
by kernel test robot
Hi Akash,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b966b5cf71790478be7726593d011cb085a97a94
commit: 048eb908a1f276ca0346f20a3e6e7d707dcd81f3 [2656/6900] soc: qcom-geni-se: Add interconnect support to fix earlycon crash
config: x86_64-randconfig-a004-20200710 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 048eb908a1f276ca0346f20a3e6e7d707dcd81f3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/soc/qcom/qcom-geni-se.c:819:11: error: implicit declaration of function 'of_get_next_parent' [-Werror,-Wimplicit-function-declaration]
parent = of_get_next_parent(wrapper->dev->of_node);
^
>> drivers/soc/qcom/qcom-geni-se.c:819:9: warning: incompatible integer to pointer conversion assigning to 'struct device_node *' from 'int' [-Wint-conversion]
parent = of_get_next_parent(wrapper->dev->of_node);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +/of_get_next_parent +819 drivers/soc/qcom/qcom-geni-se.c
808
809 void geni_remove_earlycon_icc_vote(void)
810 {
811 struct geni_wrapper *wrapper;
812 struct device_node *parent;
813 struct device_node *child;
814
815 if (!earlycon_wrapper)
816 return;
817
818 wrapper = earlycon_wrapper;
> 819 parent = of_get_next_parent(wrapper->dev->of_node);
820 for_each_child_of_node(parent, child) {
821 if (!of_device_is_compatible(child, "qcom,geni-se-qup"))
822 continue;
823 wrapper = platform_get_drvdata(of_find_device_by_node(child));
824 icc_put(wrapper->to_core.path);
825 wrapper->to_core.path = NULL;
826
827 }
828 of_node_put(parent);
829
830 earlycon_wrapper = NULL;
831 }
832 EXPORT_SYMBOL(geni_remove_earlycon_icc_vote);
833
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[android-goldfish:android-5.4 4770/9999] fs/incfs/vfs.c:1307:37: sparse: sparse: non size-preserving integer to pointer cast
by kernel test robot
tree: https://android.googlesource.com/kernel/goldfish android-5.4
head: 33f6768a35188c80518123ee75637015d01b7f32
commit: 383f53ee186a22c3d04cc6809e3b5e13bc2b571d [4770/9999] ANDROID: Incremental fs: Remove unneeded compatibility typedef
config: i386-randconfig-s032-20200710 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-37-gc9676a3b-dirty
git checkout 383f53ee186a22c3d04cc6809e3b5e13bc2b571d
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/incfs/vfs.c:1307:37: sparse: sparse: non size-preserving integer to pointer cast
>> fs/incfs/vfs.c:2054:23: sparse: sparse: cast truncates bits from constant value (5346434e49 becomes 46434e49)
vim +1307 fs/incfs/vfs.c
1be052b20ba04b Eugene Zemtsov 2019-11-18 1138
1be052b20ba04b Eugene Zemtsov 2019-11-18 1139 static long ioctl_create_file(struct mount_info *mi,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1140 struct incfs_new_file_args __user *usr_args)
1be052b20ba04b Eugene Zemtsov 2019-11-18 1141 {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1142 struct incfs_new_file_args args;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1143 char *file_id_str = NULL;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1144 struct dentry *index_file_dentry = NULL;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1145 struct dentry *named_file_dentry = NULL;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1146 struct path parent_dir_path = {};
1be052b20ba04b Eugene Zemtsov 2019-11-18 1147 struct inode *index_dir_inode = NULL;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1148 __le64 size_attr_value = 0;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1149 char *file_name = NULL;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1150 char *attr_value = NULL;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1151 int error = 0;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1152 bool locked = false;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1153
1be052b20ba04b Eugene Zemtsov 2019-11-18 1154 if (!mi || !mi->mi_index_dir) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1155 error = -EFAULT;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1156 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1157 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1158 if (!access_ok(usr_args, sizeof(args))) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1159 error = -EFAULT;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1160 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1161 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1162 if (copy_from_user(&args, usr_args, sizeof(args)) > 0) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1163 error = -EFAULT;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1164 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1165 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1166
1be052b20ba04b Eugene Zemtsov 2019-11-18 1167 file_name = strndup_user(u64_to_user_ptr(args.file_name), PATH_MAX);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1168 if (IS_ERR(file_name)) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1169 error = PTR_ERR(file_name);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1170 file_name = NULL;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1171 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1172 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1173
1be052b20ba04b Eugene Zemtsov 2019-11-18 1174 error = validate_name(file_name);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1175 if (error)
1be052b20ba04b Eugene Zemtsov 2019-11-18 1176 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1177
1be052b20ba04b Eugene Zemtsov 2019-11-18 1178 file_id_str = file_id_to_str(args.file_id);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1179 if (!file_id_str) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1180 error = -ENOMEM;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1181 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1182 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1183
1be052b20ba04b Eugene Zemtsov 2019-11-18 1184 error = mutex_lock_interruptible(&mi->mi_dir_struct_mutex);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1185 if (error)
1be052b20ba04b Eugene Zemtsov 2019-11-18 1186 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1187 locked = true;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1188
1be052b20ba04b Eugene Zemtsov 2019-11-18 1189 /* Find a directory to put the file into. */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1190 error = dir_relative_path_resolve(mi,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1191 u64_to_user_ptr(args.directory_path),
1be052b20ba04b Eugene Zemtsov 2019-11-18 1192 &parent_dir_path);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1193 if (error)
1be052b20ba04b Eugene Zemtsov 2019-11-18 1194 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1195
1be052b20ba04b Eugene Zemtsov 2019-11-18 1196 if (parent_dir_path.dentry == mi->mi_index_dir) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1197 /* Can't create a file directly inside .index */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1198 error = -EBUSY;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1199 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1200 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1201
1be052b20ba04b Eugene Zemtsov 2019-11-18 1202 /* Look up a dentry in the parent dir. It should be negative. */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1203 named_file_dentry = incfs_lookup_dentry(parent_dir_path.dentry,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1204 file_name);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1205 if (!named_file_dentry) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1206 error = -EFAULT;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1207 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1208 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1209 if (IS_ERR(named_file_dentry)) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1210 error = PTR_ERR(named_file_dentry);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1211 named_file_dentry = NULL;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1212 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1213 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1214 if (d_really_is_positive(named_file_dentry)) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1215 /* File with this path already exists. */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1216 error = -EEXIST;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1217 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1218 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1219 /* Look up a dentry in the .index dir. It should be negative. */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1220 index_file_dentry = incfs_lookup_dentry(mi->mi_index_dir, file_id_str);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1221 if (!index_file_dentry) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1222 error = -EFAULT;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1223 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1224 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1225 if (IS_ERR(index_file_dentry)) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1226 error = PTR_ERR(index_file_dentry);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1227 index_file_dentry = NULL;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1228 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1229 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1230 if (d_really_is_positive(index_file_dentry)) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1231 /* File with this ID already exists in index. */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1232 error = -EEXIST;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1233 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1234 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1235
1be052b20ba04b Eugene Zemtsov 2019-11-18 1236 /* Creating a file in the .index dir. */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1237 index_dir_inode = d_inode(mi->mi_index_dir);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1238 inode_lock_nested(index_dir_inode, I_MUTEX_PARENT);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1239 error = vfs_create(index_dir_inode, index_file_dentry,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1240 args.mode, true);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1241 inode_unlock(index_dir_inode);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1242
1be052b20ba04b Eugene Zemtsov 2019-11-18 1243 if (error)
1be052b20ba04b Eugene Zemtsov 2019-11-18 1244 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1245 if (!d_really_is_positive(index_file_dentry)) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1246 error = -EINVAL;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1247 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1248 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1249
1be052b20ba04b Eugene Zemtsov 2019-11-18 1250 /* Save the file's ID as an xattr for easy fetching in future. */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1251 error = vfs_setxattr(index_file_dentry, INCFS_XATTR_ID_NAME,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1252 file_id_str, strlen(file_id_str), XATTR_CREATE);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1253 if (error) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1254 pr_debug("incfs: vfs_setxattr err:%d\n", error);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1255 goto delete_index_file;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1256 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1257
1be052b20ba04b Eugene Zemtsov 2019-11-18 1258 /* Save the file's size as an xattr for easy fetching in future. */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1259 size_attr_value = cpu_to_le64(args.size);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1260 error = vfs_setxattr(index_file_dentry, INCFS_XATTR_SIZE_NAME,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1261 (char *)&size_attr_value, sizeof(size_attr_value),
1be052b20ba04b Eugene Zemtsov 2019-11-18 1262 XATTR_CREATE);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1263 if (error) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1264 pr_debug("incfs: vfs_setxattr err:%d\n", error);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1265 goto delete_index_file;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1266 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1267
1be052b20ba04b Eugene Zemtsov 2019-11-18 1268 /* Save the file's attrubute as an xattr */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1269 if (args.file_attr_len && args.file_attr) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1270 if (args.file_attr_len > INCFS_MAX_FILE_ATTR_SIZE) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1271 error = -E2BIG;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1272 goto delete_index_file;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1273 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1274
1be052b20ba04b Eugene Zemtsov 2019-11-18 1275 attr_value = kmalloc(args.file_attr_len, GFP_NOFS);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1276 if (!attr_value) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1277 error = -ENOMEM;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1278 goto delete_index_file;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1279 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1280
1be052b20ba04b Eugene Zemtsov 2019-11-18 1281 if (!access_ok(u64_to_user_ptr(args.file_attr),
1be052b20ba04b Eugene Zemtsov 2019-11-18 1282 args.file_attr_len)) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1283 error = -EFAULT;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1284 goto delete_index_file;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1285 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1286
1be052b20ba04b Eugene Zemtsov 2019-11-18 1287 if (copy_from_user(attr_value,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1288 u64_to_user_ptr(args.file_attr),
1be052b20ba04b Eugene Zemtsov 2019-11-18 1289 args.file_attr_len) > 0) {
1be052b20ba04b Eugene Zemtsov 2019-11-18 1290 error = -EFAULT;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1291 goto delete_index_file;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1292 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1293
1be052b20ba04b Eugene Zemtsov 2019-11-18 1294 error = vfs_setxattr(index_file_dentry,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1295 INCFS_XATTR_METADATA_NAME,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1296 attr_value, args.file_attr_len,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1297 XATTR_CREATE);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1298
1be052b20ba04b Eugene Zemtsov 2019-11-18 1299 if (error)
1be052b20ba04b Eugene Zemtsov 2019-11-18 1300 goto delete_index_file;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1301 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1302
1be052b20ba04b Eugene Zemtsov 2019-11-18 1303 /* Initializing a newly created file. */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1304 error = init_new_file(mi, index_file_dentry, &args.file_id, args.size,
1be052b20ba04b Eugene Zemtsov 2019-11-18 1305 range(attr_value, args.file_attr_len),
1be052b20ba04b Eugene Zemtsov 2019-11-18 1306 (struct incfs_file_signature_info __user *)
1be052b20ba04b Eugene Zemtsov 2019-11-18 @1307 args.signature_info);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1308 if (error)
1be052b20ba04b Eugene Zemtsov 2019-11-18 1309 goto delete_index_file;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1310
1be052b20ba04b Eugene Zemtsov 2019-11-18 1311 /* Linking a file with it's real name from the requested dir. */
1be052b20ba04b Eugene Zemtsov 2019-11-18 1312 error = incfs_link(index_file_dentry, named_file_dentry);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1313
1be052b20ba04b Eugene Zemtsov 2019-11-18 1314 if (!error)
1be052b20ba04b Eugene Zemtsov 2019-11-18 1315 goto out;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1316
1be052b20ba04b Eugene Zemtsov 2019-11-18 1317 delete_index_file:
1be052b20ba04b Eugene Zemtsov 2019-11-18 1318 incfs_unlink(index_file_dentry);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1319
1be052b20ba04b Eugene Zemtsov 2019-11-18 1320 out:
1be052b20ba04b Eugene Zemtsov 2019-11-18 1321 if (error)
1be052b20ba04b Eugene Zemtsov 2019-11-18 1322 pr_debug("incfs: %s err:%d\n", __func__, error);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1323
1be052b20ba04b Eugene Zemtsov 2019-11-18 1324 kfree(file_id_str);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1325 kfree(file_name);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1326 kfree(attr_value);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1327 dput(named_file_dentry);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1328 dput(index_file_dentry);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1329 path_put(&parent_dir_path);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1330 if (locked)
1be052b20ba04b Eugene Zemtsov 2019-11-18 1331 mutex_unlock(&mi->mi_dir_struct_mutex);
1be052b20ba04b Eugene Zemtsov 2019-11-18 1332 return error;
1be052b20ba04b Eugene Zemtsov 2019-11-18 1333 }
1be052b20ba04b Eugene Zemtsov 2019-11-18 1334
:::::: The code at line 1307 was first introduced by commit
:::::: 1be052b20ba04b635cf87bcff80de5314697953e ANDROID: Initial commit of Incremental FS
:::::: TO: Eugene Zemtsov <ezemtsov(a)google.com>
:::::: CC: Paul Lawrence <paullawrence(a)google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
drivers/video/fbdev/tdfxfb.c:1120:27: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 3 weeks ago
config: mips-randconfig-s031-20200710 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-37-gc9676a3b-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/video/fbdev/tdfxfb.c:1120:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *__s @@ got unsigned char [noderef] [usertype] __iomem *cursorbase @@
drivers/video/fbdev/tdfxfb.c:1120:27: sparse: expected void *__s
drivers/video/fbdev/tdfxfb.c:1120:27: sparse: got unsigned char [noderef] [usertype] __iomem *cursorbase
drivers/video/fbdev/tdfxfb.c:1131:33: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/tdfxfb.c:1134:33: sparse: sparse: cast removes address space '__iomem' of expression
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
--
>> drivers/video/fbdev/aty/mach64_cursor.c:156:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *__s @@ got unsigned char [noderef] [usertype] __iomem *dst @@
drivers/video/fbdev/aty/mach64_cursor.c:156:23: sparse: expected void *__s
drivers/video/fbdev/aty/mach64_cursor.c:156:23: sparse: got unsigned char [noderef] [usertype] __iomem *dst
drivers/video/fbdev/aty/mach64_cursor.c:187:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/aty/mach64_cursor.c:188:25: sparse: sparse: cast removes address space '__iomem' of expression
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
--
drivers/isdn/hardware/mISDN/hfcmulti.c:452:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
drivers/isdn/hardware/mISDN/hfcmulti.c:452:22: sparse: expected unsigned int [usertype] val
drivers/isdn/hardware/mISDN/hfcmulti.c:452:22: sparse: got restricted __le32 [usertype]
drivers/isdn/hardware/mISDN/hfcmulti.c:457:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] val @@ got restricted __le16 [usertype] @@
drivers/isdn/hardware/mISDN/hfcmulti.c:457:22: sparse: expected unsigned short [usertype] val
drivers/isdn/hardware/mISDN/hfcmulti.c:457:22: sparse: got restricted __le16 [usertype]
drivers/isdn/hardware/mISDN/hfcmulti.c:472:24: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
drivers/isdn/hardware/mISDN/hfcmulti.c:472:24: sparse: expected unsigned int [usertype] val
drivers/isdn/hardware/mISDN/hfcmulti.c:472:24: sparse: got restricted __le32 [usertype]
drivers/isdn/hardware/mISDN/hfcmulti.c:478:24: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] val @@ got restricted __le16 [usertype] @@
drivers/isdn/hardware/mISDN/hfcmulti.c:478:24: sparse: expected unsigned short [usertype] val
drivers/isdn/hardware/mISDN/hfcmulti.c:478:24: sparse: got restricted __le16 [usertype]
drivers/isdn/hardware/mISDN/hfcmulti.c:496:32: sparse: sparse: cast to restricted __le32
drivers/isdn/hardware/mISDN/hfcmulti.c:501:32: sparse: sparse: cast to restricted __le16
drivers/isdn/hardware/mISDN/hfcmulti.c:518:25: sparse: sparse: cast to restricted __le32
drivers/isdn/hardware/mISDN/hfcmulti.c:524:25: sparse: sparse: cast to restricted __le16
>> drivers/isdn/hardware/mISDN/hfcmulti.c:1092:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
>> drivers/isdn/hardware/mISDN/hfcmulti.c:1092:26: sparse: expected void const volatile [noderef] __iomem *addr
drivers/isdn/hardware/mISDN/hfcmulti.c:1092:26: sparse: got void *
arch/mips/include/asm/io.h:353:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:353:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:353:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: too many warnings
--
drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
>> drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: expected void const volatile [noderef] __iomem *mem
drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: got unsigned int [usertype] *
drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
>> drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: expected void volatile [noderef] __iomem *mem
drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: got unsigned int [usertype] *
drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
>> drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: expected void const volatile [noderef] __iomem *mem
drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: got unsigned int [usertype] *
drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
>> drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: expected void volatile [noderef] __iomem *mem
drivers/isdn/hardware/mISDN/mISDNinfineon.c:261:1: sparse: got unsigned int [usertype] *
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: sparse: cast removes address space '__iomem' of expression
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: expected void const volatile [noderef] __iomem *mem
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: got unsigned int [usertype] *
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: sparse: cast removes address space '__iomem' of expression
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: expected void volatile [noderef] __iomem *mem
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: got unsigned int [usertype] *
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: sparse: cast removes address space '__iomem' of expression
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: expected void const volatile [noderef] __iomem *mem
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: got unsigned int [usertype] *
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: sparse: cast removes address space '__iomem' of expression
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int [usertype] * @@
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: expected void volatile [noderef] __iomem *mem
drivers/isdn/hardware/mISDN/mISDNinfineon.c:262:1: sparse: got unsigned int [usertype] *
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:354:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:371:1: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
arch/mips/include/asm/io.h:372:1: sparse: sparse: cast to restricted __le32
vim +1120 drivers/video/fbdev/tdfxfb.c
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1040
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1041 static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1042 {
a807f618b62594 drivers/video/tdfxfb.c Antonino A. Daplas 2006-01-09 1043 struct tdfx_par *par = info->par;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1044 u32 vidcfg;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1045
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1046 if (!hwcursor)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1047 return -EINVAL; /* just to force soft_cursor() call */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1048
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1049 /* Too large of a cursor or wrong bpp :-( */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1050 if (cursor->image.width > 64 ||
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1051 cursor->image.height > 64 ||
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1052 cursor->image.depth > 1)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1053 return -EINVAL;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1054
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1055 vidcfg = tdfx_inl(par, VIDPROCCFG);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1056 if (cursor->enable)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1057 tdfx_outl(par, VIDPROCCFG, vidcfg | VIDCFG_HWCURSOR_ENABLE);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1058 else
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1059 tdfx_outl(par, VIDPROCCFG, vidcfg & ~VIDCFG_HWCURSOR_ENABLE);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1060
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1061 /*
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1062 * If the cursor is not be changed this means either we want the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1063 * current cursor state (if enable is set) or we want to query what
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1064 * we can do with the cursor (if enable is not set)
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1065 */
8af1d50f7f6793 drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1066 if (!cursor->set)
8af1d50f7f6793 drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1067 return 0;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1068
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1069 /* fix cursor color - XFree86 forgets to restore it properly */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1070 if (cursor->set & FB_CUR_SETCMAP) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1071 struct fb_cmap cmap = info->cmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1072 u32 bg_idx = cursor->image.bg_color;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1073 u32 fg_idx = cursor->image.fg_color;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1074 unsigned long bg_color, fg_color;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1075
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1076 fg_color = (((u32)cmap.red[fg_idx] & 0xff00) << 8) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1077 (((u32)cmap.green[fg_idx] & 0xff00) << 0) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1078 (((u32)cmap.blue[fg_idx] & 0xff00) >> 8);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1079 bg_color = (((u32)cmap.red[bg_idx] & 0xff00) << 8) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1080 (((u32)cmap.green[bg_idx] & 0xff00) << 0) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1081 (((u32)cmap.blue[bg_idx] & 0xff00) >> 8);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1082 banshee_make_room(par, 2);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1083 tdfx_outl(par, HWCURC0, bg_color);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1084 tdfx_outl(par, HWCURC1, fg_color);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1085 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1086
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1087 if (cursor->set & FB_CUR_SETPOS) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1088 int x = cursor->image.dx;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1089 int y = cursor->image.dy - info->var.yoffset;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1090
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1091 x += 63;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1092 y += 63;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1093 banshee_make_room(par, 1);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1094 tdfx_outl(par, HWCURLOC, (y << 16) + x);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1095 }
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1096 if (cursor->set & (FB_CUR_SETIMAGE | FB_CUR_SETSHAPE)) {
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1097 /*
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1098 * Voodoo 3 and above cards use 2 monochrome cursor patterns.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1099 * The reason is so the card can fetch 8 words at a time
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1100 * and are stored on chip for use for the next 8 scanlines.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1101 * This reduces the number of times for access to draw the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1102 * cursor for each screen refresh.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1103 * Each pattern is a bitmap of 64 bit wide and 64 bit high
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1104 * (total of 8192 bits or 1024 bytes). The two patterns are
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1105 * stored in such a way that pattern 0 always resides in the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1106 * lower half (least significant 64 bits) of a 128 bit word
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1107 * and pattern 1 the upper half. If you examine the data of
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1108 * the cursor image the graphics card uses then from the
25985edcedea63 drivers/video/tdfxfb.c Lucas De Marchi 2011-03-30 1109 * beginning you see line one of pattern 0, line one of
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1110 * pattern 1, line two of pattern 0, line two of pattern 1,
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1111 * etc etc. The linear stride for the cursor is always 16 bytes
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1112 * (128 bits) which is the maximum cursor width times two for
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1113 * the two monochrome patterns.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1114 */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1115 u8 __iomem *cursorbase = info->screen_base + info->fix.smem_len;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1116 u8 *bitmap = (u8 *)cursor->image.data;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1117 u8 *mask = (u8 *)cursor->mask;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1118 int i;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1119
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 @1120 fb_memset(cursorbase, 0, 1024);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1121
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1122 for (i = 0; i < cursor->image.height; i++) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1123 int h = 0;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1124 int j = (cursor->image.width + 7) >> 3;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1125
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1126 for (; j > 0; j--) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1127 u8 data = *mask ^ *bitmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1128 if (cursor->rop == ROP_COPY)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1129 data = *mask & *bitmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1130 /* Pattern 0. Copy the cursor mask to it */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1131 fb_writeb(*mask, cursorbase + h);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1132 mask++;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1133 /* Pattern 1. Copy the cursor bitmap to it */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1134 fb_writeb(data, cursorbase + h + 8);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1135 bitmap++;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1136 h++;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1137 }
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1138 cursorbase += 16;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1139 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1140 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1141 return 0;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1142 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1143
:::::: The code at line 1120 was first introduced by commit
:::::: 90b0f08536531abbbe7b5d4944792da08cadde01 tdfxfb: hardware cursor
:::::: TO: Krzysztof Helt <krzysztof.h1(a)wp.pl>
:::::: CC: Linus Torvalds <torvalds(a)woody.linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH] drm/drm_fb_helper: fix fbdev with sparc64
by kernel test robot
Hi Sam,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master v5.8-rc4 next-20200709]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sam-Ravnborg/drm-drm_fb_helper-f...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-s021-20200709 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-37-gc9676a3b-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/drm_fb_helper.c:386:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem * @@ got void *dst @@
>> drivers/gpu/drm/drm_fb_helper.c:386:29: sparse: expected void volatile [noderef] __iomem *
>> drivers/gpu/drm/drm_fb_helper.c:386:29: sparse: got void *dst
vim +386 drivers/gpu/drm/drm_fb_helper.c
373
374 static void drm_fb_helper_dirty_blit_real(struct drm_fb_helper *fb_helper,
375 struct drm_clip_rect *clip)
376 {
377 struct drm_framebuffer *fb = fb_helper->fb;
378 unsigned int cpp = fb->format->cpp[0];
379 size_t offset = clip->y1 * fb->pitches[0] + clip->x1 * cpp;
380 void *src = fb_helper->fbdev->screen_buffer + offset;
381 void *dst = fb_helper->buffer->vaddr + offset;
382 size_t len = (clip->x2 - clip->x1) * cpp;
383 unsigned int y;
384
385 for (y = clip->y1; y < clip->y2; y++) {
> 386 memcpy_toio(dst, src, len);
387 src += fb->pitches[0];
388 dst += fb->pitches[0];
389 }
390 }
391
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH v2 1/2] riscv: Add STACKPROTECTOR supported
by kernel test robot
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc4 next-20200709]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/guoren-kernel-org/riscv-Add-STAC...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7
config: riscv-randconfig-s031-20200709 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-37-gc9676a3b-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/stackprotector.h:10,
from arch/riscv/kernel/process.c:28:
arch/riscv/include/asm/stackprotector.h: In function 'boot_init_stack_canary':
>> arch/riscv/include/asm/stackprotector.h:26:23: warning: left shift count >= width of type [-Wshift-count-overflow]
26 | canary += tsc + (tsc << 32UL);
| ^~
arch/riscv/kernel/process.c: At top level:
arch/riscv/kernel/process.c:42:6: warning: no previous prototype for 'show_regs' [-Wmissing-prototypes]
42 | void show_regs(struct pt_regs *regs)
| ^~~~~~~~~
arch/riscv/kernel/process.c:103:5: warning: no previous prototype for 'arch_dup_task_struct' [-Wmissing-prototypes]
103 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
| ^~~~~~~~~~~~~~~~~~~~
vim +26 arch/riscv/include/asm/stackprotector.h
11
12 /*
13 * Initialize the stackprotector canary value.
14 *
15 * NOTE: this must only be called from functions that never return,
16 * and it must always be inlined.
17 */
18 static __always_inline void boot_init_stack_canary(void)
19 {
20 unsigned long canary;
21 unsigned long tsc;
22
23 /* Try to get a semi random initial value. */
24 get_random_bytes(&canary, sizeof(canary));
25 tsc = get_cycles();
> 26 canary += tsc + (tsc << 32UL);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
drivers/pinctrl/pinctrl-mcp23s08_spi.c:129:1-3: WARNING: PTR_ERR_OR_ZERO can be used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7
commit: 0f04a81784fe3ddc00cae74c517265b3ddb8825c pinctrl: mcp23s08: Split to three parts: core, I²C, SPI
date: 3 months ago
config: i386-randconfig-c001-20200709 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/pinctrl/pinctrl-mcp23s08_spi.c:129:1-3: WARNING: PTR_ERR_OR_ZERO can be used
vim +129 drivers/pinctrl/pinctrl-mcp23s08_spi.c
81
82 static int mcp23s08_spi_regmap_init(struct mcp23s08 *mcp, struct device *dev,
83 unsigned int addr, unsigned int type)
84 {
85 const struct regmap_config *config;
86 struct regmap_config *copy;
87 const char *name;
88
89 switch (type) {
90 case MCP_TYPE_S08:
91 mcp->reg_shift = 0;
92 mcp->chip.ngpio = 8;
93 mcp->chip.label = devm_kasprintf(dev, GFP_KERNEL, "mcp23s08.%d", addr);
94
95 config = &mcp23x08_regmap;
96 name = devm_kasprintf(dev, GFP_KERNEL, "%d", addr);
97 break;
98
99 case MCP_TYPE_S17:
100 mcp->reg_shift = 1;
101 mcp->chip.ngpio = 16;
102 mcp->chip.label = devm_kasprintf(dev, GFP_KERNEL, "mcp23s17.%d", addr);
103
104 config = &mcp23x17_regmap;
105 name = devm_kasprintf(dev, GFP_KERNEL, "%d", addr);
106 break;
107
108 case MCP_TYPE_S18:
109 mcp->reg_shift = 1;
110 mcp->chip.ngpio = 16;
111 mcp->chip.label = "mcp23s18";
112
113 config = &mcp23x17_regmap;
114 name = config->name;
115 break;
116
117 default:
118 dev_err(dev, "invalid device type (%d)\n", type);
119 return -EINVAL;
120 }
121
122 copy = devm_kmemdup(dev, &config, sizeof(config), GFP_KERNEL);
123 if (!copy)
124 return -ENOMEM;
125
126 copy->name = name;
127
128 mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp, copy);
> 129 if (IS_ERR(mcp->regmap))
130 return PTR_ERR(mcp->regmap);
131
132 return 0;
133 }
134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months