public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [intel-tdx:guest-filter-upstream 5/30] drivers/base/da_firmware.c:145:8: warning: no previous prototype for function 'parse_firmware_devices'
Date: Tue, 24 Jan 2023 11:23:09 +0800	[thread overview]
Message-ID: <202301241135.15kn7DPy-lkp@intel.com> (raw)

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

                 reply	other threads:[~2023-01-24  3:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202301241135.15kn7DPy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox