[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5bb50ad5-5eb4-40e5-86d0-7645eab78e2b@163.com>
Date: Mon, 24 Mar 2025 09:08:05 +0800
From: Hans Zhang <18255117159@....com>
To: kernel test robot <lkp@...el.com>, lpieralisi@...nel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, kw@...ux.com,
manivannan.sadhasivam@...aro.org, robh@...nel.org, bhelgaas@...gle.com,
jingoohan1@...il.com, thomas.richard@...tlin.com, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [v6 3/5] PCI: cadence: Use common PCI host bridge APIs for
finding the capabilities
On 2025/3/24 03:26, kernel test robot wrote:
> 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@intel.com/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@intel.com/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@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202503240338.N37HXlm9-lkp@intel.com/
>
> 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
Will change. 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
>
Powered by blists - more mailing lists