[OpenBIOS] [PATCH 1/7] pci.c: fix build for non-SPARC/PPC platforms

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Feb 5 19:09:00 CET 2016


Commit r1377 accidentally broke compilation with -Werror for platforms without
a default PCI interrupt implementation. Supply a suitable (empty) stub in order
to keep the compiler quiet.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 openbios-devel/drivers/pci.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/openbios-devel/drivers/pci.c b/openbios-devel/drivers/pci.c
index 6d0af12..5062f30 100644
--- a/openbios-devel/drivers/pci.c
+++ b/openbios-devel/drivers/pci.c
@@ -1500,19 +1500,20 @@ static void ob_pci_host_set_interrupt_map(phandle_t host)
 
                     /* Device address is in 1st 32-bit word of encoded PCI address for config space */
                     if ((addr & PCI_RANGE_TYPE_MASK) == PCI_RANGE_CONFIG) {
-#ifdef CONFIG_SPARC64
+#if defined(CONFIG_SPARC64)
                         ncells += pci_encode_phys_addr(props + ncells, 0, 0, addr, 0, 0);
                         props[ncells++] = intno;
                         props[ncells++] = dnode;
                         props[ncells++] = SUN4U_INTERRUPT(addr, intno);
-#endif
-
-#ifdef CONFIG_PPC
+#elif defined(CONFIG_PPC)
                         ncells += pci_encode_phys_addr(props + ncells, 0, 0, addr, 0, 0);
                         props[ncells++] = intno;
                         props[ncells++] = dnode;
                         props[ncells++] = arch->irqs[intno - 1];
                         props[ncells++] = 3;
+#else
+                        /* Keep compiler quiet */
+                        dnode = dnode;
 #endif
                     }
                 }
-- 
1.7.10.4




More information about the OpenBIOS mailing list