Re: [v3 1/4] PCI: Introduce generic capability search functions

From: kernel test robot
Date: Fri Mar 21 2025 - 05:40:21 EST


Hi Hans,

kernel test robot noticed the following build warnings:

[auto build test WARNING on a1cffe8cc8aef85f1b07c4464f0998b9785b795a]

url: https://github.com/intel-lab-lkp/linux/commits/Hans-Zhang/PCI-Introduce-generic-capability-search-functions/20250321-120748
base: a1cffe8cc8aef85f1b07c4464f0998b9785b795a
patch link: https://lore.kernel.org/r/20250321040358.360755-2-18255117159%40163.com
patch subject: [v3 1/4] PCI: Introduce generic capability search functions
config: arm-randconfig-004-20250321 (https://download.01.org/0day-ci/archive/20250321/202503211730.XKhqW2Mw-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/20250321/202503211730.XKhqW2Mw-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/202503211730.XKhqW2Mw-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from arch/arm/mm/iomap.c:9:
>> include/linux/pci.h:2021:4: warning: no previous prototype for function 'pci_generic_find_capability' [-Wmissing-prototypes]
2021 | u8 pci_generic_find_capability(void *priv, pci_generic_read_cfg read_cfg,
| ^
include/linux/pci.h:2021:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2021 | u8 pci_generic_find_capability(void *priv, pci_generic_read_cfg read_cfg,
| ^
| static
>> include/linux/pci.h:2024:5: warning: no previous prototype for function 'pci_generic_find_ext_capability' [-Wmissing-prototypes]
2024 | u16 pci_generic_find_ext_capability(void *priv, pci_generic_read_cfg read_cfg,
| ^
include/linux/pci.h:2024:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2024 | u16 pci_generic_find_ext_capability(void *priv, pci_generic_read_cfg read_cfg,
| ^
| static
2 warnings generated.


vim +/pci_generic_find_capability +2021 include/linux/pci.h

1999
2000 static inline void pci_set_master(struct pci_dev *dev) { }
2001 static inline void pci_clear_master(struct pci_dev *dev) { }
2002 static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; }
2003 static inline void pci_disable_device(struct pci_dev *dev) { }
2004 static inline int pcim_enable_device(struct pci_dev *pdev) { return -EIO; }
2005 static inline int pci_assign_resource(struct pci_dev *dev, int i)
2006 { return -EBUSY; }
2007 static inline int __must_check __pci_register_driver(struct pci_driver *drv,
2008 struct module *owner,
2009 const char *mod_name)
2010 { return 0; }
2011 static inline int pci_register_driver(struct pci_driver *drv)
2012 { return 0; }
2013 static inline void pci_unregister_driver(struct pci_driver *drv) { }
2014 static inline u8 pci_find_capability(struct pci_dev *dev, int cap)
2015 { return 0; }
2016 static inline u8 pci_find_next_capability(struct pci_dev *dev, u8 post, int cap)
2017 { return 0; }
2018 static inline u16 pci_find_ext_capability(struct pci_dev *dev, int cap)
2019 { return 0; }
2020 typedef u32 (*pci_generic_read_cfg)(void *priv, int where, int size);
> 2021 u8 pci_generic_find_capability(void *priv, pci_generic_read_cfg read_cfg,
2022 u8 cap)
2023 { return 0; }
> 2024 u16 pci_generic_find_ext_capability(void *priv, pci_generic_read_cfg read_cfg,
2025 u8 cap)
2026 { return 0; }
2027 static inline u64 pci_get_dsn(struct pci_dev *dev)
2028 { return 0; }
2029

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki