kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org
Subject: [mst-vhost:vhost 4/8] include/linux/pci.h:2738:7: error: call to undeclared function 'pci_device_is_present'; ISO C99 and later do not support implicit function declarations
Date: Wed, 9 Jul 2025 16:06:50 +0800	[thread overview]
Message-ID: <202507091645.aPGUJH6X-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head:   97d5f469f45a2312a124376fd6fa368ef8419dff
commit: b7468115b6045e555aa8a8f2fa327c1c073fc6df [4/8] pci: report surprise removal event
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20250709/202507091645.aPGUJH6X-lkp@intel.com/config)
compiler: clang version 20.1.7 (https://github.com/llvm/llvm-project 6146a88f60492b520a36f8f8f3231e15f3cc6082)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250709/202507091645.aPGUJH6X-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507091645.aPGUJH6X-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/dma/direct.c:16:
   In file included from include/linux/pci-p2pdma.h:14:
>> include/linux/pci.h:2738:7: error: call to undeclared function 'pci_device_is_present'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2738 |         if (!pci_device_is_present(pdev))
         |              ^
   include/linux/pci.h:2738:7: note: did you mean 'pci_dev_present'?
   include/linux/pci.h:2042:19: note: 'pci_dev_present' declared here
    2042 | static inline int pci_dev_present(const struct pci_device_id *ids)
         |                   ^
   kernel/dma/direct.c:148:20: warning: shift count >= width of type [-Wshift-count-overflow]
     148 |                     phys_limit < DMA_BIT_MASK(64) &&
         |                                  ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:73:54: note: expanded from macro 'DMA_BIT_MASK'
      73 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
         |                                                      ^ ~~~
   1 warning and 1 error generated.


vim +/pci_device_is_present +2738 include/linux/pci.h

  2722	
  2723	/*
  2724	 * Caller must initialize @pdev->disconnect_work before invoking this.
  2725	 * The work function must run and check pci_test_and_clear_disconnect_enable.
  2726	 * Note that device can go away right after this call.
  2727	 */
  2728	static inline void pci_set_disconnect_work(struct pci_dev *pdev)
  2729	{
  2730		/* Make sure WQ has been initialized already */
  2731		smp_wmb();
  2732	
  2733		WRITE_ONCE(pdev->disconnect_work_enable, 0x1);
  2734	
  2735		/* check the device did not go away meanwhile. */
  2736		mb();
  2737	
> 2738		if (!pci_device_is_present(pdev))
  2739			schedule_work(&pdev->disconnect_work);
  2740	}
  2741	

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

                 reply	other threads:[~2025-07-09  8:07 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=202507091645.aPGUJH6X-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=virtualization@lists.linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).