diff options
| author | Hans de Goede <[email protected]> | 2021-12-17 15:15:15 +0100 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2021-12-17 15:23:21 -0600 |
| commit | 877fee2a0c65a3b0b6ac0e90d7d7718b5a0341d3 (patch) | |
| tree | f375aacad4840d99522a50c14344d3f7478f6571 | |
| parent | d2c64f98c3878b25e987b6b8f5100732c6426640 (diff) | |
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/[email protected]
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Cc: [email protected]
| -rw-r--r-- | include/linux/pci.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 18a75c8e615c..7d825637d7ca 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1775,7 +1775,10 @@ static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from) { return NULL; } -#define pci_dev_present(ids) (0) + +static inline int pci_dev_present(const struct pci_device_id *ids) +{ return 0; } + #define no_pci_devices() (1) #define pci_dev_put(dev) do { } while (0) |