Skip to contentSkip to conversation

parisc: Move pci_dev_is_behind_card_dino to where it is used

PATCH Applied Guenter Roeck 2 participants 2 messages Sep 8, 2021 PA-RISC architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 parisc: Move pci_dev_is_behind_card_dino to where it is used

parisc build test images fail to compile with the following error.

drivers/parisc/dino.c:160:12: error:
'pci_dev_is_behind_card_dino' defined but not used

Move the function just ahead of its only caller to avoid the error.

Fixes 5fa1659105fa ("parisc: Disable HP HSC-PCI Cards to prevent kernel crash")
Cc Helge Deller <[email protected]>
---
 drivers/parisc/dino.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/parisc/dino.c +9 -9
index 889d7ce282eb..952a92504df6 100644
@@ -156,15 +156,6 @@ static inline struct dino_device *DINO_DEV(struct pci_hba_data *hba)
 	return container_of(hba, struct dino_device, hba);
 }
 
-/* Check if PCI device is behind a Card-mode Dino. */
-static int pci_dev_is_behind_card_dino(struct pci_dev *dev)
-{
-	struct dino_device *dino_dev;
-
-	dino_dev = DINO_DEV(parisc_walk_tree(dev->bus->bridge));
-	return is_card_dino(&dino_dev->hba.dev->id);
-}
-
 /*
  * Dino Configuration Space Accessor Functions
  */
@@ -447,6 +438,15 @@ static void quirk_cirrus_cardbus(struct pci_dev *dev)
 DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6832, quirk_cirrus_cardbus );
 
 #ifdef CONFIG_TULIP
+/* Check if PCI device is behind a Card-mode Dino. */
+static int pci_dev_is_behind_card_dino(struct pci_dev *dev)
+{
+	struct dino_device *dino_dev;
+
+	dino_dev = DINO_DEV(parisc_walk_tree(dev->bus->bridge));
+	return is_card_dino(&dino_dev->hba.dev->id);
+}
+
 static void pci_fixup_tulip(struct pci_dev *dev)
 {
 	if (!pci_dev_is_behind_card_dino(dev))
Signature · 1 line
2.33.0
maintainer Applied
#1 lore raw
Quoted 10 lines · Guenter Roeck

parisc build test images fail to compile with the following error.

drivers/parisc/dino.c:160:12: error:
'pci_dev_is_behind_card_dino' defined but not used

Move the function just ahead of its only caller to avoid the error.

Fixes 5fa1659105fa ("parisc: Disable HP HSC-PCI Cards to prevent kernel crash")
Cc Helge Deller <[email protected]>

applied to the parisc tree.

Thanks!
Helge

Quoted 41 lines
---
  drivers/parisc/dino.c | 18 +++++++++---------
  1 file changed, 9 insertions(+), 9 deletions(-)
drivers/parisc/dino.c +9 -9
index 889d7ce282eb..952a92504df6 100644
@@ -156,15 +156,6 @@ static inline struct dino_device *DINO_DEV(struct pci_hba_data *hba)
  	return container_of(hba, struct dino_device, hba);
  }
 
-/* Check if PCI device is behind a Card-mode Dino. */
-static int pci_dev_is_behind_card_dino(struct pci_dev *dev)
-{
-	struct dino_device *dino_dev;
-
-	dino_dev = DINO_DEV(parisc_walk_tree(dev->bus->bridge));
-	return is_card_dino(&dino_dev->hba.dev->id);
-}
-
  /*
   * Dino Configuration Space Accessor Functions
   */
@@ -447,6 +438,15 @@ static void quirk_cirrus_cardbus(struct pci_dev *dev)
  DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6832, quirk_cirrus_cardbus );
 
  #ifdef CONFIG_TULIP
+/* Check if PCI device is behind a Card-mode Dino. */
+static int pci_dev_is_behind_card_dino(struct pci_dev *dev)
+{
+	struct dino_device *dino_dev;
+
+	dino_dev = DINO_DEV(parisc_walk_tree(dev->bus->bridge));
+	return is_card_dino(&dino_dev->hba.dev->id);
+}
+
  static void pci_fixup_tulip(struct pci_dev *dev)
  {
  	if (!pci_dev_is_behind_card_dino(dev))