Skip to contentSkip to conversation

PCI: Fix allnoconfig with PCI DMA source quirk

PATCH In review Alex Williamson 2 participants 2 messages Jun 12, 2012 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Fix allnoconfig with PCI DMA source quirk

When CONFIG_PCI_QUIRKS is not defined we want to keep the reference counting the same for callers of pci_get_dma_source. But I forgot to account for !CONFIG_PCI where we then need to make an inline for pci_get_dev. This fixes it.

---

 include/linux/pci.h |    3 +++
 1 file changed, 3 insertions(+)
include/linux/pci.h +3 -0
index 95479cd..35884f27 100644
@@ -1368,6 +1368,9 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
 static inline int pci_domain_nr(struct pci_bus *bus)
 { return 0; }
 
+static inline struct pci_dev *pci_dev_get(struct pci_dev *dev)
+{ return NULL; }
+
 #define dev_is_pci(d) (false)
 #define dev_is_pf(d) (false)
 #define dev_num_vf(d) (0)
maintainer
#1 lore raw
Quoted 16 lines · Alex Williamson

When CONFIG_PCI_QUIRKS is not defined we want to keep the reference counting the same for callers of pci_get_dma_source.  But I forgot to account for !CONFIG_PCI where we then need to make an inline for pci_get_dev.  This fixes it.

---

 include/linux/pci.h |    3 +++

 1 file changed, 3 insertions(+)
include/linux/pci.h +0 -0
index 95479cd..35884f27 100644

include/linux/pci.h static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, · line 1372

Quoted 5 lines
include/linux/pci.h +2 -0
@@ -1368,6 +1368,9 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
  static inline int pci_domain_nr(struct pci_bus *bus)
  { return 0; }
 
+static inline struct pci_dev *pci_dev_get(struct pci_dev *dev)
+{ return NULL; }

I folded this into patch [1/5] and will rebase "next" today.