Re: [PATCH 2/2] serial: exar: adding CTI PCI/PCIe serial port support to 8250_exar

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

 



Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tty/tty-testing]
[also build test WARNING on tty/tty-next tty/tty-linus usb/usb-testing usb/usb-next usb/usb-linus pci/next pci/for-linus linus/master v6.9-rc3 next-20240411]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/parker-finest-io/serial-exar-add-missing-CTI-Exar-PCI-IDs-to-include-linux-pci_ids-h/20240412-011902
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link:    https://lore.kernel.org/r/9ffdef053f455c87f705dff169346bc10d307787.1712846026.git.pnewman%40connecttech.com
patch subject: [PATCH 2/2] serial: exar: adding CTI PCI/PCIe serial port support to 8250_exar
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240412/202404121307.6nkI7fuG-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8b3b4a92adee40483c27f26c478a384cd69c6f05)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240412/202404121307.6nkI7fuG-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404121307.6nkI7fuG-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from drivers/tty/serial/8250/8250_exar.c:13:
   In file included from include/linux/interrupt.h:21:
   In file included from arch/riscv/include/asm/sections.h:9:
   In file included from include/linux/mm.h:2208:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/tty/serial/8250/8250_exar.c:1573:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
    1573 |                 default:
         |                 ^
   drivers/tty/serial/8250/8250_exar.c:1573:3: note: insert 'break;' to avoid fall-through
    1573 |                 default:
         |                 ^
         |                 break; 
   2 warnings generated.


vim +1573 drivers/tty/serial/8250/8250_exar.c

  1547	
  1548	static unsigned int exar_get_nr_ports(struct exar8250_board *board,
  1549						struct pci_dev *pcidev)
  1550	{
  1551		unsigned int nr_ports = 0;
  1552	
  1553		if (!board || !pcidev)
  1554			return 0;
  1555	
  1556		if (pcidev->vendor == PCI_VENDOR_ID_ACCESSIO) {
  1557			nr_ports = BIT(((pcidev->device & 0x38) >> 3) - 1);
  1558		} else if (board->num_ports > 0) {
  1559			//Check if board struct overrides number of ports
  1560			nr_ports = board->num_ports;
  1561		} else if (pcidev->vendor == PCI_VENDOR_ID_EXAR) {
  1562			//Exar encodes # ports in last nibble of PCI Device ID ex. 0358
  1563			nr_ports = pcidev->device & 0x0f;
  1564		} else  if (pcidev->vendor == PCI_VENDOR_ID_CONNECT_TECH) {
  1565			//Handle CTI FPGA cards
  1566			switch (pcidev->device) {
  1567			case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_12_XIG00X:
  1568			case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_12_XIG01X:
  1569				nr_ports = 12;
  1570				break;
  1571			case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_16:
  1572				nr_ports = 16;
> 1573			default:
  1574				break;
  1575			}
  1576		}
  1577	
  1578		return nr_ports;
  1579	}
  1580	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux