Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Tweak comments.



details:   https://anonhg.NetBSD.org/src/rev/c08d11290bb3
branches:  trunk
changeset: 1029037:c08d11290bb3
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Dec 19 19:26:48 2021 +0000

description:
Tweak comments.

diffstat:

 sys/dev/acpi/acpi_pci_link.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (45 lines):

diff -r abc569351c35 -r c08d11290bb3 sys/dev/acpi/acpi_pci_link.c
--- a/sys/dev/acpi/acpi_pci_link.c      Sun Dec 19 19:15:48 2021 +0000
+++ b/sys/dev/acpi/acpi_pci_link.c      Sun Dec 19 19:26:48 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_pci_link.c,v 1.27 2021/12/19 19:15:48 skrll Exp $ */
+/*     $NetBSD: acpi_pci_link.c,v 1.28 2021/12/19 19:26:48 skrll Exp $ */
 
 /*-
  * Copyright (c) 2002 Mitsuru IWASAKI <iwasaki%jp.freebsd.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_pci_link.c,v 1.27 2021/12/19 19:15:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci_link.c,v 1.28 2021/12/19 19:26:48 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -1049,7 +1049,6 @@
                return (link->l_irq);
        }
 
-       /* Choose an IRQ if we need one. */
        if (PCI_INTERRUPT_VALID(link->l_irq)) {
                *irq = link->l_irq;
                *pol = link->l_pol;
@@ -1057,15 +1056,15 @@
                goto done;
        }
 
+       /* The link device doesn't have an interrupt, so try to choose one. */
        link->l_irq = acpi_pci_link_choose_irq(sc, link);
+       if (!PCI_INTERRUPT_VALID(link->l_irq))
+               goto done;
 
        /*
         * Try to route the interrupt we picked.  If it fails, then
         * assume the interrupt is not routed.
         */
-       if (!PCI_INTERRUPT_VALID(link->l_irq))
-               goto done;
-
        acpi_pci_link_route_irqs(sc, irq, pol, trig);
        if (!link->l_routed) {
                link->l_irq = PCI_INVALID_IRQ;



Home | Main Index | Thread Index | Old Index