From ceca5dedbc13ddc31df69c0c9d9664c5c2347f19 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Mon, 28 Jun 2021 11:59:33 +0200 Subject: [PATCH] device/pci_device.c: Reuse `irq` variable The `irq` variable has the same value as `pIntAtoD[line - 1]`. Change-Id: Iabf760adbc3014b32cfe6f908dc04c38b71bd980 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/55892 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Werner Zeh --- src/device/pci_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/device/pci_device.c b/src/device/pci_device.c index 36346603cf..63c1dc522a 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -1633,11 +1633,10 @@ void pci_assign_irqs(struct device *dev, const unsigned char pIntAtoD[4]) printk(BIOS_DEBUG, "Assigning IRQ %d to %s\n", irq, dev_path(dev)); - pci_write_config8(dev, PCI_INTERRUPT_LINE, pIntAtoD[line - 1]); + pci_write_config8(dev, PCI_INTERRUPT_LINE, irq); /* Change to level triggered. */ - i8259_configure_irq_trigger(pIntAtoD[line - 1], - IRQ_LEVEL_TRIGGERED); + i8259_configure_irq_trigger(irq, IRQ_LEVEL_TRIGGERED); } }