drivers/pci/pci.c:3911 pci_pio_to_address() warn: always true condition '(pio >= (0 - 0)) => (0-u64max >= 0)'
From: kernel test robot
Date: Mon Aug 10 2020 - 14:32:41 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: b8104fda1fff0882e43b7e98832a76d7e98eb3e9 logic_pio: Define PIO_INDIRECT_SIZE for !CONFIG_INDIRECT_PIO
date: 9 months ago
config: s390-randconfig-m031-20200810 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
New smatch warnings:
drivers/pci/pci.c:3911 pci_pio_to_address() warn: always true condition '(pio >= (0 - 0)) => (0-u64max >= 0)'
Old smatch warnings:
drivers/pci/pci.c:5982 pci_specified_resource_alignment() warn: should '1 << align_order' be a 64 bit type?
vim +3911 drivers/pci/pci.c
c5076cfe768998 Tomasz Nowicki 2016-05-11 3905
c5076cfe768998 Tomasz Nowicki 2016-05-11 3906 phys_addr_t pci_pio_to_address(unsigned long pio)
c5076cfe768998 Tomasz Nowicki 2016-05-11 3907 {
c5076cfe768998 Tomasz Nowicki 2016-05-11 3908 phys_addr_t address = (phys_addr_t)OF_BAD_ADDR;
c5076cfe768998 Tomasz Nowicki 2016-05-11 3909
c5076cfe768998 Tomasz Nowicki 2016-05-11 3910 #ifdef PCI_IOBASE
5745392e0c2b78 Zhichang Yuan 2018-03-15 @3911 if (pio >= MMIO_UPPER_LIMIT)
c5076cfe768998 Tomasz Nowicki 2016-05-11 3912 return address;
c5076cfe768998 Tomasz Nowicki 2016-05-11 3913
5745392e0c2b78 Zhichang Yuan 2018-03-15 3914 address = logic_pio_to_hwaddr(pio);
c5076cfe768998 Tomasz Nowicki 2016-05-11 3915 #endif
c5076cfe768998 Tomasz Nowicki 2016-05-11 3916
c5076cfe768998 Tomasz Nowicki 2016-05-11 3917 return address;
c5076cfe768998 Tomasz Nowicki 2016-05-11 3918 }
c5076cfe768998 Tomasz Nowicki 2016-05-11 3919
:::::: The code at line 3911 was first introduced by commit
:::::: 5745392e0c2b78e0d73203281d5c42cbd6993194 PCI: Apply the new generic I/O management on PCI IO hosts
:::::: TO: Zhichang Yuan <yuanzhichang@xxxxxxxxxxxxx>
:::::: CC: Bjorn Helgaas <helgaas@xxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip