CC: [email protected]
CC: [email protected]
TO: Christophe Leroy <[email protected]>
CC: Michael Ellerman <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   bdb575f872175ed0ecf2638369da1cb7a6e86a14
commit: 894fa235eb4ca0bfa692dbe4932c2f940cdc8c1e powerpc: inline iomap accessors
date:   10 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 10 months ago
config: powerpc64-randconfig-m031-20210916 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/pci/pci.c:4050 pci_remap_iospace() warn: impossible condition 
'(res->end > ~(0)) => (0-u32max > u32max)'

vim +4050 drivers/pci/pci.c

c5076cfe768998 Tomasz Nowicki    2016-05-11  4031  
8b921acfeffdb0 Liviu Dudau       2014-09-29  4032  /**
8b921acfeffdb0 Liviu Dudau       2014-09-29  4033   * pci_remap_iospace - Remap 
the memory mapped I/O space
8b921acfeffdb0 Liviu Dudau       2014-09-29  4034   * @res: Resource describing 
the I/O space
8b921acfeffdb0 Liviu Dudau       2014-09-29  4035   * @phys_addr: physical 
address of range to be mapped
8b921acfeffdb0 Liviu Dudau       2014-09-29  4036   *
74356addc0b32e Bjorn Helgaas     2019-01-09  4037   * Remap the memory mapped 
I/O space described by the @res and the CPU
74356addc0b32e Bjorn Helgaas     2019-01-09  4038   * physical address 
@phys_addr into virtual address space.  Only
74356addc0b32e Bjorn Helgaas     2019-01-09  4039   * architectures that have 
memory mapped IO functions defined (and the
74356addc0b32e Bjorn Helgaas     2019-01-09  4040   * PCI_IOBASE value defined) 
should call this function.
8b921acfeffdb0 Liviu Dudau       2014-09-29  4041   */
7b309aef046334 Lorenzo Pieralisi 2017-04-19  4042  int pci_remap_iospace(const 
struct resource *res, phys_addr_t phys_addr)
8b921acfeffdb0 Liviu Dudau       2014-09-29  4043  {
8b921acfeffdb0 Liviu Dudau       2014-09-29  4044  #if defined(PCI_IOBASE) && 
defined(CONFIG_MMU)
8b921acfeffdb0 Liviu Dudau       2014-09-29  4045       unsigned long vaddr = 
(unsigned long)PCI_IOBASE + res->start;
8b921acfeffdb0 Liviu Dudau       2014-09-29  4046  
8b921acfeffdb0 Liviu Dudau       2014-09-29  4047       if (!(res->flags & 
IORESOURCE_IO))
8b921acfeffdb0 Liviu Dudau       2014-09-29  4048               return -EINVAL;
8b921acfeffdb0 Liviu Dudau       2014-09-29  4049  
8b921acfeffdb0 Liviu Dudau       2014-09-29 @4050       if (res->end > 
IO_SPACE_LIMIT)
8b921acfeffdb0 Liviu Dudau       2014-09-29  4051               return -EINVAL;
8b921acfeffdb0 Liviu Dudau       2014-09-29  4052  
8b921acfeffdb0 Liviu Dudau       2014-09-29  4053       return 
ioremap_page_range(vaddr, vaddr + resource_size(res), phys_addr,
8b921acfeffdb0 Liviu Dudau       2014-09-29  4054                               
  pgprot_device(PAGE_KERNEL));
8b921acfeffdb0 Liviu Dudau       2014-09-29  4055  #else
74356addc0b32e Bjorn Helgaas     2019-01-09  4056       /*
74356addc0b32e Bjorn Helgaas     2019-01-09  4057        * This architecture 
does not have memory mapped I/O space,
74356addc0b32e Bjorn Helgaas     2019-01-09  4058        * so this function 
should never be called
74356addc0b32e Bjorn Helgaas     2019-01-09  4059        */
8b921acfeffdb0 Liviu Dudau       2014-09-29  4060       WARN_ONCE(1, "This 
architecture does not support memory mapped I/O\n");
8b921acfeffdb0 Liviu Dudau       2014-09-29  4061       return -ENODEV;
8b921acfeffdb0 Liviu Dudau       2014-09-29  4062  #endif
8b921acfeffdb0 Liviu Dudau       2014-09-29  4063  }
f90b0875463e45 Brian Norris      2017-03-09  4064  
EXPORT_SYMBOL(pci_remap_iospace);
8b921acfeffdb0 Liviu Dudau       2014-09-29  4065  

:::::: The code at line 4050 was first introduced by commit
:::::: 8b921acfeffdb0b45085da862fc301a2d25ed2cf PCI: Add pci_remap_iospace() to 
map bus I/O resources

:::::: TO: Liviu Dudau <[email protected]>
:::::: CC: Bjorn Helgaas <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to