[v4] USB: serial: ftdi_sio: Add MTP NVM support
From: kbuild test robot <hidden>
Date: 2018-06-25 12:07:23
Hi Loic, Thank you for the patch! Yet something to improve: [auto build test ERROR on usb/usb-testing] [also build test ERROR on v4.18-rc2 next-20180625] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Loic-Poulain/USB-serial-ftdi_sio-Add-MTP-NVM-support/20180625-181125 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing config: ia64-allyesconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 8.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=8.1.0 make.cross ARCH=ia64 All errors (new ones prefixed by >>): drivers/usb/serial/ftdi_sio.c: In function 'ftdi_register_eeprom': drivers/usb/serial/ftdi_sio.c:1603:18: error: 'SZ_2K' undeclared (first use in this function) nvmconf.size = SZ_2K; ^~~~~ drivers/usb/serial/ftdi_sio.c:1603:18: note: each undeclared identifier is reported only once for each function it appears in
quoted
drivers/usb/serial/ftdi_sio.c:1606:18: error: 'SZ_128' undeclared (first use in this function)
nvmconf.size = SZ_128;
^~~~~~
vim +/SZ_128 +1606 drivers/usb/serial/ftdi_sio.c
1594
1595 static int ftdi_register_eeprom(struct usb_serial_port *port)
1596 {
1597 struct ftdi_private *priv = usb_get_serial_port_data(port);
1598 struct usb_device *udev = port->serial->dev;
1599 struct nvmem_config nvmconf = {};
1600
1601 switch (priv->chip_type) {
1602 case FTX:1603 nvmconf.size = SZ_2K;
1604 break; 1605 case FT232RL:
1606 nvmconf.size = SZ_128;
1607 break;
1608 default:
1609 return 0;
1610 }
1611
1612 nvmconf.word_size = 2;
1613 nvmconf.stride = 2;
1614 nvmconf.read_only = false;
1615 nvmconf.priv = port;
1616 nvmconf.dev = &udev->dev;
1617 nvmconf.reg_read = ftdi_read_eeprom;
1618 nvmconf.reg_write = ftdi_write_eeprom;
1619 nvmconf.owner = THIS_MODULE;
1620
1621 priv->eeprom = nvmem_register(&nvmconf);
1622 if (IS_ERR(priv->eeprom)) {
1623 dev_err(&udev->dev, "Unable to register FTDI EEPROM\n");
1624 priv->eeprom = NULL;
1625 return -ENOMEM;
1626 }
1627
1628 dev_info(&udev->dev, "Registered %d-byte FTDI EEPROM\n", nvmconf.size);
1629
1630 return 0;
1631 }
1632
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation