[OS-BUILD PATCH] pci.h: Fix static include

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

pci.h: Fix static include

Add a static include to avoid a compile error for the RHEL specific PCI
functions.

This fixes the error:

... in function `pci_hw_disabled':
/home/kernel-ark/./include/linux/pci.h:1495: multiple definition of `pci_hw_disabled'; drivers/gpu/drm/nouveau/nvif/object.o:/home/kernel-ark/./include/linux/pci.h:1495: first defined here

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>

diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index blahblah..blahblah 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -371,7 +371,6 @@ const struct pci_device_id *pci_hw_disabled(const struct pci_device_id *ids,
 	return ret;
 }
 EXPORT_SYMBOL(pci_hw_disabled);
-
 #endif
 
 struct drv_dev_and_id {
diff --git a/include/linux/pci.h b/include/linux/pci.h
index blahblah..blahblah 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1491,8 +1491,8 @@ static inline const struct pci_device_id *pci_hw_deprecated(const struct pci_dev
 							    struct pci_dev *dev) { return NULL; }
 static inline const struct pci_device_id *pci_hw_unmaintained(const struct pci_device_id *ids,
 							      struct pci_dev *dev) { return NULL; }
-const struct pci_device_id *pci_hw_disabled(const struct pci_device_id *ids,
-					    struct pci_dev *dev) {return NULL; }
+static inline const struct pci_device_id *pci_hw_disabled(const struct pci_device_id *ids,
+							  struct pci_dev *dev) {return NULL; }
 #endif
 int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
 		    int pass);

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1523
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux