Skip to contentSkip to conversation

PCI: Fix compile error with DPC disabled

PATCH In review Keith Busch 2 participants 5 messages Sep 21, 2018 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Fix compile error with DPC disabled

The alternate functions when CONFIG_PCIE_DPC is not defined need to be static inline.

---
 drivers/pci/pci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/pci.h +2 -2
index a244bd0c5ca7..eb3125decffe 100644
@@ -402,8 +402,8 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
 void pci_save_dpc_state(struct pci_dev *dev);
 void pci_restore_dpc_state(struct pci_dev *dev);
 #else
-void pci_save_dpc_state(struct pci_dev *dev) {}
-void pci_restore_dpc_state(struct pci_dev *dev) {}
+static inline void pci_save_dpc_state(struct pci_dev *dev) {}
+static inline void pci_restore_dpc_state(struct pci_dev *dev) {}
 #endif
 
 #ifdef CONFIG_PCI_ATS
Signature · 1 line
2.14.4
#1 lore raw
Quoted 4 lines · Keith Busch

The alternate functions when CONFIG_PCIE_DPC is not defined need to be static inline.

If you tell me which patch, I'll fold this into it so there's no bisection hole.

Quoted 22 lines
---
 drivers/pci/pci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/pci.h +2 -2
index a244bd0c5ca7..eb3125decffe 100644
@@ -402,8 +402,8 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
 void pci_save_dpc_state(struct pci_dev *dev);
 void pci_restore_dpc_state(struct pci_dev *dev);
 #else
-void pci_save_dpc_state(struct pci_dev *dev) {}
-void pci_restore_dpc_state(struct pci_dev *dev) {}
+static inline void pci_save_dpc_state(struct pci_dev *dev) {}
+static inline void pci_restore_dpc_state(struct pci_dev *dev) {}
 #endif
 
 #ifdef CONFIG_PCI_ATS
Signature · 1 line
2.14.4
#2 lore raw
Quoted 8 lines · Bjorn Helgaas
Quoted 4 lines · Keith Busch

The alternate functions when CONFIG_PCIE_DPC is not defined need to be static inline.

If you tell me which patch, I'll fold this into it so there's no bisection hole.

Thanks, I like that plan.

Fixes d17964c0d81fc38c7 ("PCI/DPC: Save and restore config state")

https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/hotplug&id=d17964c0d81fc38c733fc5281436d2b262306a33

Quoted 22 lines
Quoted 22 lines
---
 drivers/pci/pci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/pci.h +2 -2
index a244bd0c5ca7..eb3125decffe 100644
@@ -402,8 +402,8 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
 void pci_save_dpc_state(struct pci_dev *dev);
 void pci_restore_dpc_state(struct pci_dev *dev);
 #else
-void pci_save_dpc_state(struct pci_dev *dev) {}
-void pci_restore_dpc_state(struct pci_dev *dev) {}
+static inline void pci_save_dpc_state(struct pci_dev *dev) {}
+static inline void pci_restore_dpc_state(struct pci_dev *dev) {}
 #endif
 
 #ifdef CONFIG_PCI_ATS
Signature · 1 line
2.14.4
#3 lore raw
Quoted 7 lines · Keith Busch
Quoted 6 lines · Bjorn Helgaas
Quoted 4 lines · Keith Busch

The alternate functions when CONFIG_PCIE_DPC is not defined need to be static inline.

Quoted 8 lines
Quoted 2 lines

If you tell me which patch, I'll fold this into it so there's no bisection hole.

Thanks, I like that plan.

Fixes d17964c0d81fc38c7 ("PCI/DPC: Save and restore config state")

https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/hotplug&id=d17964c0d81fc38c733fc5281436d2b262306a33

Done, sorry to bother you, I could have figured that out in 10 seconds myself from the 0-day robot email.

#4 lore raw
Quoted 11 lines · Bjorn Helgaas
Quoted 10 lines · Keith Busch
Quoted 8 lines · Bjorn Helgaas
Quoted 4 lines · Keith Busch

The alternate functions when CONFIG_PCIE_DPC is not defined need to be static inline.

If you tell me which patch, I'll fold this into it so there's no bisection hole.

Quoted 8 lines
Quoted 5 lines

Thanks, I like that plan.

Fixes d17964c0d81fc38c7 ("PCI/DPC: Save and restore config state")

https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/hotplug&id=d17964c0d81fc38c733fc5281436d2b262306a33

Done, sorry to bother you, I could have figured that out in 10 seconds myself from the 0-day robot email.

Oh, no problem at all. The breakage was my mistake, so my apologies. I don't like getting caught by 0-day, but I'm happy it's there! :)