lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202507091645.aPGUJH6X-lkp@intel.com>
Date: Wed, 9 Jul 2025 16:06:50 +0800
From: kernel test robot <lkp@...el.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
	netdev@...r.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

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ