PCI: Convert pci_dev_present() stub to static inline
authorHans de Goede <hdegoede@redhat.com>
Fri, 17 Dec 2021 14:15:15 +0000 (15:15 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 17 Dec 2021 21:23:21 +0000 (15:23 -0600)
commit877fee2a0c65a3b0b6ac0e90d7d7718b5a0341d3
treef375aacad4840d99522a50c14344d3f7478f6571
parentd2c64f98c3878b25e987b6b8f5100732c6426640
PCI: Convert pci_dev_present() stub to static inline

Change the pci_dev_present() stub which is used when CONFIG_PCI is not set
from a #define to a static inline stub.

Thix should fix clang -Werror builds failing due to errors like this:

  drivers/platform/x86/thinkpad_acpi.c:4475:35:
   error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]

Where fwbug_cards_ids is an array of pci_device_id passed to
pci_dev_present() during a quirk check.

Link: https://lore.kernel.org/r/20211217141515.379586-1-hdegoede@redhat.com
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: platform-driver-x86@vger.kernel.org
include/linux/pci.h