tree:
https://github.com/0day-ci/linux/commits/UPDATE-20210616-152150/tu-pham/U...
head: 2231b2167ae347d41d081c3e62492ceb0c93c675
commit: 2231b2167ae347d41d081c3e62492ceb0c93c675 USB: serial: cp210x: add support for
GPIOs on CP2108
date: 6 hours ago
config: sparc-randconfig-s032-20210615 (attached as .config)
compiler: sparc-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.3-341-g8af24329-dirty
#
https://github.com/0day-ci/linux/commit/2231b2167ae347d41d081c3e62492ceb0...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
UPDATE-20210616-152150/tu-pham/USB-serial-cp210x-Add-support-for-GPIOs-on-CP2108/20210426-171349
git checkout 2231b2167ae347d41d081c3e62492ceb0c93c675
# 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__' W=1 ARCH=sparc
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/serial/cp210x.c:1515:9: sparse: sparse: incorrect
type in argument 1 (different base types) @@ expected unsigned short [usertype] *p @@
got restricted __le16 [usertype] * @@
drivers/usb/serial/cp210x.c:1515:9:
sparse: expected unsigned short [usertype] *p
drivers/usb/serial/cp210x.c:1515:9: sparse: got restricted __le16 [usertype] *
vim +1515 drivers/usb/serial/cp210x.c
1477
1478 static int cp210x_gpio_get(struct gpio_chip *gc, unsigned int gpio)
1479 {
1480 struct usb_serial *serial = gpiochip_get_data(gc);
1481 struct cp210x_serial_private *priv = usb_get_serial_data(serial);
1482 u8 req_type;
1483 u16 mask;
1484 int result;
1485 int len;
1486
1487 result = usb_autopm_get_interface(serial->interface);
1488 if (result)
1489 return result;
1490
1491 switch (priv->partnum) {
1492 case CP210X_PARTNUM_CP2105:
1493 req_type = REQTYPE_INTERFACE_TO_HOST;
1494 len = 1;
1495 break;
1496 case CP210X_PARTNUM_CP2108:
1497 req_type = REQTYPE_INTERFACE_TO_HOST;
1498 len = 2;
1499 break;
1500 default:
1501 req_type = REQTYPE_DEVICE_TO_HOST;
1502 len = 1;
1503 break;
1504 }
1505
1506 mask = 0;
1507 result = cp210x_read_vendor_block(serial, req_type, CP210X_READ_LATCH,
1508 &mask, len);
1509
1510 usb_autopm_put_interface(serial->interface);
1511
1512 if (result < 0)
1513 return result;
1514
1515 le16_to_cpus((__le16 *)&mask);
1516
1517 return !!(mask & BIT(gpio));
1518 }
1519
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org