git: df10f7b7500c - main - acpi_pci_link: Remove a helper variable from _PRS parsing
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 14 Nov 2026 16:03:29 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=df10f7b7500c129c48a477e94039c4e0d2711b54
commit df10f7b7500c129c48a477e94039c4e0d2711b54
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-11-14 16:02:38 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-11-14 16:02:38 +0000
acpi_pci_link: Remove a helper variable from _PRS parsing
Tested by: cperciva
---
sys/dev/acpica/acpi_pci_link.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/sys/dev/acpica/acpi_pci_link.c b/sys/dev/acpica/acpi_pci_link.c
index cb6adee87252..378e4631e97d 100644
--- a/sys/dev/acpica/acpi_pci_link.c
+++ b/sys/dev/acpica/acpi_pci_link.c
@@ -275,7 +275,7 @@ link_add_prs(ACPI_RESOURCE *res, void *context)
struct link *link;
UINT8 *irqs = NULL;
UINT32 *ext_irqs = NULL;
- int i, is_ext_irq = 1;
+ int i;
ACPI_SERIAL_ASSERT(pci_link);
req = (struct link_res_request *)context;
@@ -299,8 +299,6 @@ link_add_prs(ACPI_RESOURCE *res, void *context)
req->in_dpf = DPF_OUTSIDE;
break;
case ACPI_RESOURCE_TYPE_IRQ:
- is_ext_irq = 0;
- /* fall through */
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
/*
* Don't parse resources if we are in a DPF set that we are
@@ -325,7 +323,7 @@ link_add_prs(ACPI_RESOURCE *res, void *context)
* _SRS.
*/
tmp = &link->l_prs_template;
- if (is_ext_irq) {
+ if (res->Type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) {
bcopy(res, tmp, ACPI_RS_SIZE(tmp->Data.ExtendedIrq));
/*
@@ -356,7 +354,7 @@ link_add_prs(ACPI_RESOURCE *res, void *context)
link->l_irqs = malloc(sizeof(int) * link->l_num_irqs,
M_PCI_LINK, M_WAITOK | M_ZERO);
for (i = 0; i < link->l_num_irqs; i++) {
- if (is_ext_irq) {
+ if (ext_irqs != NULL) {
link->l_irqs[i] = ext_irqs[i];
if (ext_irqs[i] >= NUM_ISA_INTERRUPTS)
link->l_isa_irq = false;