drivers/platform/x86/intel/vsec.c:340:6: error: redefinition of 'intel_vsec_register'
From: kernel test robot
Date: Tue Oct 01 2024 - 22:40:53 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e32cde8d2bd7d251a8f9b434143977ddf13dcec6
commit: fc9aef4382c02774662da3d7e1de8ba224e04f80 platform/x86/intel/vsec.h: Move to include/linux
date: 7 weeks ago
config: x86_64-randconfig-r133-20240215 (https://download.01.org/0day-ci/archive/20241002/202410021056.c4DcySHh-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410021056.c4DcySHh-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/202410021056.c4DcySHh-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
drivers/platform/x86/intel/vsec.c: In function 'intel_vsec_walk_dvsec':
drivers/platform/x86/intel/vsec.c:257:23: error: implicit declaration of function 'pci_find_next_ext_capability'; did you mean 'pci_find_next_capability'? [-Werror=implicit-function-declaration]
257 | pos = pci_find_next_ext_capability(pdev, pos, PCI_EXT_CAP_ID_DVSEC);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pci_find_next_capability
drivers/platform/x86/intel/vsec.c: At top level:
>> drivers/platform/x86/intel/vsec.c:340:6: error: redefinition of 'intel_vsec_register'
340 | void intel_vsec_register(struct pci_dev *pdev,
| ^~~~~~~~~~~~~~~~~~~
In file included from drivers/platform/x86/intel/vsec.c:21:
include/linux/intel_vsec.h:129:20: note: previous definition of 'intel_vsec_register' with type 'void(struct pci_dev *, struct intel_vsec_platform_info *)'
129 | static inline void intel_vsec_register(struct pci_dev *pdev,
| ^~~~~~~~~~~~~~~~~~~
drivers/platform/x86/intel/vsec.c:510:1: warning: data definition has no type or storage class
510 | module_pci_driver(intel_vsec_pci_driver);
| ^~~~~~~~~~~~~~~~~
drivers/platform/x86/intel/vsec.c:510:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int]
drivers/platform/x86/intel/vsec.c:510:1: warning: parameter names (without types) in function declaration
drivers/platform/x86/intel/vsec.c:504:26: warning: 'intel_vsec_pci_driver' defined but not used [-Wunused-variable]
504 | static struct pci_driver intel_vsec_pci_driver = {
| ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/intel_vsec_register +340 drivers/platform/x86/intel/vsec.c
a3c8f906ed5fc1 David E. Box 2021-12-07 339
4edbd117ba3f7b Gayatri Kammela 2023-11-29 @340 void intel_vsec_register(struct pci_dev *pdev,
4edbd117ba3f7b Gayatri Kammela 2023-11-29 341 struct intel_vsec_platform_info *info)
4edbd117ba3f7b Gayatri Kammela 2023-11-29 342 {
fc9aef4382c027 David E. Box 2024-07-25 343 if (!pdev || !info || !info->headers)
4edbd117ba3f7b Gayatri Kammela 2023-11-29 344 return;
4edbd117ba3f7b Gayatri Kammela 2023-11-29 345
4edbd117ba3f7b Gayatri Kammela 2023-11-29 346 intel_vsec_walk_header(pdev, info);
4edbd117ba3f7b Gayatri Kammela 2023-11-29 347 }
4edbd117ba3f7b Gayatri Kammela 2023-11-29 348 EXPORT_SYMBOL_NS_GPL(intel_vsec_register, INTEL_VSEC);
4edbd117ba3f7b Gayatri Kammela 2023-11-29 349
:::::: The code at line 340 was first introduced by commit
:::::: 4edbd117ba3f7beacfb439aad60e8a5de77114b4 platform/x86/intel/vsec: Add intel_vsec_register
:::::: TO: Gayatri Kammela <gayatri.kammela@xxxxxxxxxxxxxxx>
:::::: CC: Hans de Goede <hdegoede@xxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki