Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/acpi In acpi_md_OsRemoveInterruptHandler() redi...



details:   https://anonhg.NetBSD.org/src/rev/7a1f73360b7e
branches:  trunk
changeset: 449516:7a1f73360b7e
user:      kre <kre%NetBSD.org@localhost>
date:      Sat Mar 09 10:04:41 2019 +0000

description:
In acpi_md_OsRemoveInterruptHandler() redir and mpflags are only
relevant to the NIOAPIC > 0 case (not used without that).  Rearrange
#if's slightly to make that happen (avoid "set but not used" warnings
(aka errors) when NIOAPIC == 0 (or undefined)).

diffstat:

 sys/arch/x86/acpi/acpi_machdep.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r a607d5b80c04 -r 7a1f73360b7e sys/arch/x86/acpi/acpi_machdep.c
--- a/sys/arch/x86/acpi/acpi_machdep.c  Sat Mar 09 09:51:29 2019 +0000
+++ b/sys/arch/x86/acpi/acpi_machdep.c  Sat Mar 09 10:04:41 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_machdep.c,v 1.24 2019/03/09 08:42:25 maxv Exp $ */
+/* $NetBSD: acpi_machdep.c,v 1.25 2019/03/09 10:04:41 kre Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.24 2019/03/09 08:42:25 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.25 2019/03/09 10:04:41 kre Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -174,12 +174,12 @@
 {
        void *ih;
        struct pic *pic;
+       int irq, pin;
 #if NIOAPIC > 0
        struct ioapic_softc *sc;
        struct acpi_md_override ovr;
        struct mp_intr_map tmpmap, *mip, **mipp = NULL;
-#endif
-       int irq, pin, redir, mpflags;
+       int redir, mpflags;
 
        /*
         * ACPI interrupts default to level-triggered active-low.
@@ -188,7 +188,6 @@
        mpflags = (MPS_INTTR_LEVEL << 2) | MPS_INTPO_ACTLO;
        redir = IOAPIC_REDLO_LEVEL | IOAPIC_REDLO_ACTLO;
 
-#if NIOAPIC > 0
 
        /*
         * Apply any MADT override setting.



Home | Main Index | Thread Index | Old Index