Re: [v6 3/5] PCI: cadence: Use common PCI host bridge APIs for finding the capabilities

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

 



Hi Hans,

kernel test robot noticed the following build errors:

[auto build test ERROR on a1cffe8cc8aef85f1b07c4464f0998b9785b795a]

url:    https://github.com/intel-lab-lkp/linux/commits/Hans-Zhang/PCI-Introduce-generic-capability-search-functions/20250324-005300
base:   a1cffe8cc8aef85f1b07c4464f0998b9785b795a
patch link:    https://lore.kernel.org/r/20250323164852.430546-4-18255117159%40163.com
patch subject: [v6 3/5] PCI: cadence: Use common PCI host bridge APIs for finding the capabilities
config: riscv-randconfig-001-20250324 (https://download.01.org/0day-ci/archive/20250324/202503240338.N37HXlm9-lkp@xxxxxxxxx/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project c2692afc0a92cd5da140dfcdfff7818a5b8ce997)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250324/202503240338.N37HXlm9-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/202503240338.N37HXlm9-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/pci/controller/cadence/pcie-cadence.c:20:11: warning: variable 'val' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
      20 |         else if (size == 1)
         |                  ^~~~~~~~~
   drivers/pci/controller/cadence/pcie-cadence.c:23:9: note: uninitialized use occurs here
      23 |         return val;
         |                ^~~
   drivers/pci/controller/cadence/pcie-cadence.c:20:7: note: remove the 'if' if its condition is always true
      20 |         else if (size == 1)
         |              ^~~~~~~~~~~~~~
      21 |                 val = readb(pcie->reg_base + where);
   drivers/pci/controller/cadence/pcie-cadence.c:14:9: note: initialize the variable 'val' to silence this warning
      14 |         u32 val;
         |                ^
         |                 = 0
>> drivers/pci/controller/cadence/pcie-cadence.c:28:9: error: call to undeclared function 'pci_host_bridge_find_capability'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      28 |         return pci_host_bridge_find_capability(pcie, cdns_pcie_read_cfg, cap);
         |                ^
>> drivers/pci/controller/cadence/pcie-cadence.c:33:9: error: call to undeclared function 'pci_host_bridge_find_ext_capability'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      33 |         return pci_host_bridge_find_ext_capability(pcie, cdns_pcie_read_cfg, cap);
         |                ^
   drivers/pci/controller/cadence/pcie-cadence.c:33:9: note: did you mean 'cdns_pcie_find_ext_capability'?
   drivers/pci/controller/cadence/pcie-cadence.c:31:5: note: 'cdns_pcie_find_ext_capability' declared here
      31 | u16 cdns_pcie_find_ext_capability(struct cdns_pcie *pcie, u8 cap)
         |     ^
      32 | {
      33 |         return pci_host_bridge_find_ext_capability(pcie, cdns_pcie_read_cfg, cap);
         |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                cdns_pcie_find_ext_capability
   1 warning and 2 errors generated.


vim +/pci_host_bridge_find_capability +28 drivers/pci/controller/cadence/pcie-cadence.c

    25	
    26	u8 cdns_pcie_find_capability(struct cdns_pcie *pcie, u8 cap)
    27	{
  > 28		return pci_host_bridge_find_capability(pcie, cdns_pcie_read_cfg, cap);
    29	}
    30	
    31	u16 cdns_pcie_find_ext_capability(struct cdns_pcie *pcie, u8 cap)
    32	{
  > 33		return pci_host_bridge_find_ext_capability(pcie, cdns_pcie_read_cfg, cap);
    34	}
    35	

-- 
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