public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [intel-tdx:guest-filter-upstream 5/30] drivers/base/da_firmware.c:145:8: warning: no previous prototype for function 'parse_firmware_devices'
@ 2023-01-24  3:23 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-01-24  3:23 UTC (permalink / raw)
  To: Kuppuswamy Sathyanarayanan; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/intel/tdx.git guest-filter-upstream
head:   2eb6cd239352583e1275ed7d6e772e7bbc0343b0
commit: 304ef1a77b5f5171d3e3ceb4d315ac79b135ab92 [5/30] driver core: Add support to parse device authorize firmware
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20230124/202301241135.15kn7DPy-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel/tdx/commit/304ef1a77b5f5171d3e3ceb4d315ac79b135ab92
        git remote add intel-tdx https://github.com/intel/tdx.git
        git fetch --no-tags intel-tdx guest-filter-upstream
        git checkout 304ef1a77b5f5171d3e3ceb4d315ac79b135ab92
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/coco/tdx/ drivers/base/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/base/da_firmware.c:145:8: warning: no previous prototype for function 'parse_firmware_devices' [-Wmissing-prototypes]
   size_t parse_firmware_devices(struct da_bus_node *node, void *data)
          ^
   drivers/base/da_firmware.c:145:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   size_t parse_firmware_devices(struct da_bus_node *node, void *data)
   ^
   static 
   1 warning generated.


vim +/parse_firmware_devices +145 drivers/base/da_firmware.c

   144	
 > 145	size_t parse_firmware_devices(struct da_bus_node *node, void *data)
   146	{
   147		struct da_pci_device_id *da_id = data;
   148		struct pci_device_id *pci_ids;
   149		struct da_bus_device_id *ids;
   150		unsigned int i;
   151	
   152		if (!strncmp(node->name, "pci", 3)) {
   153			pci_ids = kmalloc_array(node->count, sizeof(*pci_ids), GFP_KERNEL | __GFP_ZERO);
   154			if (!pci_ids)
   155				return 0;
   156	
   157			for (i = 0; i < node->count; i++)
   158				memcpy(&pci_ids[i], &da_id[i], sizeof(*da_id));
   159	
   160			node->dev_ids = pci_ids;
   161	
   162			return sizeof(*da_id) * node->count;
   163		}
   164	
   165		ids = kmalloc_array(node->count, sizeof(*ids), GFP_KERNEL);
   166		if (!ids)
   167			return 0;
   168	
   169		memcpy(ids, data, sizeof(*ids) * node->count);
   170	
   171		node->dev_ids = ids;
   172	
   173		return sizeof(*ids) * node->count;
   174	}
   175	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-24  3:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-24  3:23 [intel-tdx:guest-filter-upstream 5/30] drivers/base/da_firmware.c:145:8: warning: no previous prototype for function 'parse_firmware_devices' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox